I am getting this error while running a simple code using Visual Studio Code's CodeRunner extension while print values in the same line separated using a space in python.
for i in range(0,6):
print(i, end = ' ')
Error: print(i, end = ' ') SyntaxError: invalid syntax. However, the same code runs I select 'Run Python File in Terminal' Please help me out on this issue and suggest possible alternatives/fixes.