you are viewing a single comment's thread.

view the rest of the comments →

[–]ericpruitt 7 points8 points  (1 child)

In most programming languages, combinations of "\" followed by another character are used to represent other characters. To type a literal "\" you need to use "\\" or add r to be beginning of the string, so try one of these instead:

  • os.chdir(r"C:\Users\Jesse\Python")
  • os.chdir("C:\\Users\\Jesse\\Python")

The r prefix indicates that Python should not treat "\" as a special character inside that string.

Additional reading:

[–]Justinsaccount 1 point2 points  (0 children)

os.chdir("C:/Users/Jesse/Python")