repl.it
@JosephLooney/

ReadWriteFiles

Python

No description

fork
loading
Files
  • main.py
  • music.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
filer=open("music.txt","w")#W for write will replace the existing file with the new context, R for read will read the file, and A for add will add on to the end of the file.

filer.write("Beans\n")
filer.write("Popcorn\n")
filer.write("Ramen\n")
filer.write("Chipotle Burritos\n")
filer.write("Orange Chicken\n")
filer.write("White Rice\n")

filer.close()

print(filer)
Fetching token
?