[Solved] Error when writing file

[ad_1]

Here a short answer :
the value that you want is ‘w’ which is a string
but in line 3-5 you are executing code for integer
using the list,length and index of list
Rather than this try to code:
write() with an string
Then It will work

1

[ad_2]

solved Error when writing file