0

Why does this code:

import pathlib
path = pathlib.Path("C:\Users\lucg\Desktop\hello.txt")

Raise the error: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

I'm new to this area of python and I dont understand the explanation given in my book.

Despereaux
  • 137
  • 10

0 Answers0