Jan-17-2019, 02:06 PM
(Jan-17-2019, 01:55 PM)MrGoat Wrote: Still doesnt work whether I use shebang or not
(Jan-17-2019, 05:53 AM)MrGoat Wrote:
Error:CaiGengYangs-MacBook-Pro-2:Lesson 1 caigengyang$ bash Question8.py Question8.py: line 5: syntax error near unexpected token `(' Question8.py: line 5: `for i in range(6):'
Without python shebang your command
bash Question8.py
will run it as a bash script.Try
python Question8.py
or use proper python2 shebang.