0

I changed my code to writelines but still I can’t save new information in next line when I run each time .help please

f=open(“namejson.txt”,”r+”) total=json.dumps([list1,list2]) f.writelines(total) f.close()

28th Dec 2020, 8:08 AM
Rozhan
4 Answers
+ 7
Rozhan , can you also provide the code for creating your input (json? or just text?) file? please also put your code in playground and link it here. Thanks!
28th Dec 2020, 10:26 AM
Lothar
Lothar - avatar
+ 1
Lother ,i don’t know how do it .
29th Dec 2020, 6:24 AM
Rozhan