Why do I receive a syntax error for the following one liner python code?
python -c 'import re; if True: print "HELLO";'
File "<string>", line 1
import re; if True: print "HELLO";
^
SyntaxError: invalid syntax
The following code works just fine
python -c 'if True: print "HELLO";'
How can I change my one line to execute my intended script on a single line from the command line?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…