Have been to trying to learn python from a couple of days, encountered a syntax error but seems to work in the tutorial that I am learning from, here's the code
def func(a):
for i in range(a,10):
print(i,end=' ')
func(2)
And the error
print(i,end=' ')
^
SyntaxError: invalid syntax
python --version, are you positive that you are running at least version 3.0? I believe that syntax isn't permissible in earlier versions.