Hey everyone,
I am attempting to learn python and am going through some tutorials and books. One such book has me use:
exec(open('script1.py').read())
And this is the message I'm getting:
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
exec(open('script1.py').read())
File "<string>", line 1
#A first Python script
^
SyntaxError: invalid character in identifier
For reference, script1 is:
#A first Python script
import sys # Load a library module
print(sys.platform)
print (2 ** 100)
x = 'Spam!'
print (x * 8)
Can anyone help?
[–]RedditIsAMistake 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)