how to store file contents in list python code example
Example: read file into list python
with open('file1.txt','r+') as f:
lines=f.read().splitlines()
print(lines)
with open('file1.txt','r+') as f:
lines=f.read().splitlines()
print(lines)