The backslash is the escape character. This should work:
os.path.isfile("C:\\Users\\xxx\\Desktop\\xxx")
This works because you avoid the escape character, and Python passes it as this literal:
"C:\Users\xxx\Desktop\xxx"
- (, , ), , os.path.join
path_segments = ['/', 'Users', 'xxx', 'Desktop', 'xxx']
os.path.isfile(os.path.join(*path_segments))
True .