i want to put a path in a string but in some places like some where have \n in the path i give an error
code: import pygame
pygame.init()
icon = 'C:\Users\treed\PycharmProjects\pythonProject1'
pygame.image.load(icon)
and the error:
File "C:\Users\treed\PycharmProjects\pythonProject1\pythaon - Copy.py", line 4
icon = 'C:\Users\treed\PycharmProjects\pythonProject1'
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
Process finished with exit code 1
how can i put path in a string?