Skip to content
Can I use file IO in repl.it in python
Profile icon
ROCKINGRAYQUAZA

Can I use file IO in repl.it in python if yes then how i have tried but it is showing me an error and also tell that if I can use OS module in repl.it or not because they both are showing an error...please help.

You are viewing a single comment. View All
Profile icon
CodeLongAndPros

File io:

with open("foo", 'r') as f: print(f.read()) with open("bar", 'w') as f: f.write("bar\n")

os module:

import os print(os.listdir()) os.system("ls -R /")