I am working on file operations using python.
I have a filepath as :
filepath = "E:/ABC/SEM 2/testfiles/all.txt"
when I am opening the file using python, it says me :
IOError: No such file:
but, the file is present on the drive.
It may be because windows cannnot take "SEM 2" properly as it contains space.
How can I deal with such whitespaces in the path of window path?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…