I'm starting to learn Linux and I wanted to create myself an python file with simple line of code which is
print("Hello World")
Running the file in terminal gives me this error that I cannot fix which says
Syntax error near unexpected token ` "Hello World!" '
I tried adding \ and / next to parenthesis but it didn't work either. Any ideas?
python file1.pynot using./unless you specify the interpreter path in the script.#!/usr/bin/env python; otherwise your shell will assume that the script is a shell script, and run it with a shell instead of with a Python interpreter.