15 lines
342 B
Python
15 lines
342 B
Python
f = open("io/data/file1")
|
|
print(f.read(5))
|
|
print(f.readline())
|
|
print(f.read())
|
|
f = open("io/data/file1")
|
|
print(f.readlines())
|
|
f = open("io/data/file1","r")
|
|
print(f.readlines())
|
|
f = open("io/data/file1","rb")
|
|
print(f.readlines())
|
|
f = open("io/data/file1",mode="r")
|
|
print(f.readlines())
|
|
f = open("io/data/file1",mode="rb")
|
|
print(f.readlines())
|