How do I append to a file?

Đinh Yến

New member
How do I append to a file?
Answer
So to append to a file it’s as easy as:
f = open(‘filename.txt’, ‘a’) f.write (‘whatever you want to write here (in append mode) here.
 

Tìm kiếm

Back
Top