“ValueError: embedded null character” when using open()

后端 未结 4 1160
一整个雨季
一整个雨季 2021-01-04 06:48

I am taking python at my college and I am stuck with my current assignment. We are supposed to take 2 files and compare them. I am simply trying to open the files so I can

4条回答
  •  旧巷少年郎
    2021-01-04 07:30

    If you are trying to open a file then you should use the path generated by os, like so:

    import os
    os.path.join("path","to","the","file")
    

提交回复
热议问题