blob: 86d010eaf657aedad80f308c9b60023add60128d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
f = open("io/data/file1")
print(f.readline())
print(f.readline(3))
print(f.readline(4))
print(f.readline(5))
print(f.readline())
# readline() on writable file
f = open("io/data/file1", "ab")
try:
f.readline()
except OSError:
print("OSError")
f.close()
|