Python SyntaxError: invalid syntax end=''

>>> import sys
>>> print(sys.version)
2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)]
>>> from __future__ import print_function
>>> print(1, end=',')
1,

If you're running it from the command line you may also just need to use the python3 command instead of just python command such as:

python3 MyFile.py

It seems like you're using Python 2.x, not Python 3.x.

Check your python version:

>>> import sys
>>> sys.version
'2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]'
>>> print(1, end='')
  File "<stdin>", line 1
    print(1, end='')
                ^
SyntaxError: invalid syntax

In Python 3.x, it should not raise Syntax Error:

>>> import sys
>>> sys.version
'3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)]'
>>> print(1, end='')
1>>>