readlines() function to store all the lines in a text document into list

 


f = open("file_name.txt")
content = f.readlines()
print(content)
f.close()




Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

What is the difference between iostream and iostream.h in cpp?

The Basic Structure of a Full-Stack Web App