'VS code can't execute Hello World program (Error)

I just started to learn Python on Visual Studio Code, I was about to write my first Hello world program but it gives me this error:

print("Hello", end=" ")
print("World!")

print("Hello", end=" ")
                  ^
SyntaxError: invalid syntax

Am I doing something wrong? Please help me, thanks for the help!

I'm on a MacBook Pro M1 Max



Solution 1:[1]

You are using python 2.x version. end= only works for python 3.x

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matei Piele