Kasper Bielecki

From the class Code Toolkit Python · Fall 2021

Text File Editor

Week 11

inclass.py

f = open("data.txt")

file_contents = f.read()

print(file_contents)

f = open("data.txt","w")
s = input("Type the new contents of the file: ")
f.write(s)