fork download
  1. # file_ops.py
  2. def main():
  3. filename = "testfile.txt"
  4.  
  5. # Writing to a file
  6. with open(filename, 'w') as file:
  7. file.write("Hello, Termux!")
  8.  
  9. # Reading from the file
  10. with open(filename, 'r') as file:
  11. content = file.read()
  12. print(content)
  13. # your code goes here
Success #stdin #stdout 0.07s 14084KB
stdin
Standard input is empty
stdout
Standard output is empty