f.read example 2
This commit is contained in:
parent
595bf74790
commit
f6adb94839
1 changed files with 6 additions and 0 deletions
6
python-temel/f.read.2.py
Normal file
6
python-temel/f.read.2.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
with open('test.txt', 'r') as f:
|
||||||
|
while True:
|
||||||
|
s = f.read(5)
|
||||||
|
if s == '':
|
||||||
|
break
|
||||||
|
print(s, end='')
|
Loading…
Reference in a new issue