๐Ÿ“– Beginning Python Programming /
Module: Files Operation

More file object operation

๐Ÿ“– Beginning Python Programming / Files Operation / More file object operation

Writing a list into file

list = ["Susan", "Chris", "Anthony", "Joana"]
with open("guests2.txt", "a") as file_obj:        
    file_obj.writelines(list)