3/12 Writing - Bug?


#1

Hi All,

Please help.
And the output.txt is empty.

Thank you.


#2

Hi @netsurfer20026,

Try this instead ...

my_file = open("output.txt", "w+")

In "w+" mode, the open function will create the file if it does not yet exist.


#3

Thank you @appylpye, it works!
So the default "r+" doesn't work because the file hasn't been created yet, I see.


#4