Append List Python || File Handling || Python
In this we are going to see a basic program to append list in a file in Python Programming Language.


def append_list():
    f = open("file.txt", "a")
    f.write("\n")
    f.write("\n".join(["a", "b", "c"]))
    f.close()

    f = open("file.txt", "r")
    print(f.read())
    f.close()

append_list()

# Coded By Dhiraj Shelke


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post