syntax error in for loop
Title
Question
In [6]: %run -i sqrt_num_list.py
File ~\sqrt_num_list.py:1
Python 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)] on win32
^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
I am not understanding this error please explain. I used IDLE to code input and the saved file is in the current working directory.
Python-3.4.3 Getting-started-with-for 03-04 min 10-20 sec
Answers:
If it contains something like "Python 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)] on win32", then delete this line. This information is not valid Python code, it's likely a copy-paste error from running a command that includes interpreter details.Ensure that the rest of your script contains only valid Python code. The first line of your script should be a Python statement.
Login to add comment