An integer is required? open()

前端 未结 5 1561
遇见更好的自我
遇见更好的自我 2020-11-28 10:43

I have a very simple python script that should scan a text file, which contains lines formatted as id=\'value\' and put them into a dict.

5条回答
  •  温柔的废话
    2020-11-28 11:10

    Providing these parameters resolved my issue:

    with open('tomorrow.txt', mode='w', encoding='UTF-8', errors='strict', buffering=1) as file:
        file.write(result)
    

提交回复
热议问题