Backslash is the escape symbol. This should work:
os.path.isfile("C:\Users\xxx\Desktop\xxx")
This works because you escape the escape symbol, and Python passes it as this literal:
"C:UsersxxxDesktopxxx"
But it's better practice and ensures cross-platform compatibility to collect your path segments (perhaps conditionally, based on the platform) like this and use os.path.join
path_segments = ['/', 'Users', 'xxx', 'Desktop', 'xxx']
os.path.isfile(os.path.join(*path_segments))
Should return True
for your case.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…