A program writes a file in two steps, then reads it back. with open("log.txt", "w") as f: f.write("one\ntwo\n") with open("log.txt", "a") as f: f.write("three") with open("log.txt") as f: first = f.readline() rest = f.readlines() print(repr(first), rest, len(rest)) What does the program print?
Log in to join the discussion.
Loading…