Im pretty new to Python (2.7) and no programming experience before. Anyway Im in the process of learning python but have a mysterious error that I can't figure out. Whenever I put equal sign in print statement, I get syntax error.
here's an example code
def main(): f = open('lines.txt') for line in f: print(line, end = '') if __name__ == "__main__": main()
really simple but it was just for a line break so I i ignore "end = ''" (actually figured out by using comma^^) but as I learn more, the problem is getting bigger and bigger.
please anyone knows what is the problem? I assume that it could be Python version issue (Im using 2.7) but not really sure. If it is which version of Python should I use? btw I really like .format function tho