I keep getting 'invalid character in identifier' when opening a file in python
13,839
Two problems:
Those tick characters
‘
are not valid. Use single'
or double"
quotes.The correct syntax is
with open(...) as f
. You're missing thewith
statement.
The editor you're using should be highlighting your text in different colors to help you with this. If you don't have an editor that can do this, try downloading Sublime Text or Atom.
Author by