this question has answer here:
- how append file? 8 answers
i try make possible save progress in python game put following line giving me problems:
dataw = open("data.dat","wb")
how can stop line clearing file.
you're opening file in write mode:
'w'
writing (an existing file same name erased)
emphasis mine
you meant use append mode:
'a'
opens file appending
Comments
Post a Comment