read file, file = open("data.txt", "r"), data=file.read(), print(data), file.close (), write to file, file = open("data.txt", "w"), file.write("Hello"), file.close()

File read and write

Leaderboard

Visual style

Options

Switch template

Continue editing: ?