walrus and f.readline example
This commit is contained in:
parent
ba439fc907
commit
453e277292
1 changed files with 3 additions and 0 deletions
3
python-temel/f.readline.2.py
Normal file
3
python-temel/f.readline.2.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
with open('sample.py', 'r') as f:
|
||||
while (s := f.readline()) != '':
|
||||
print(s, end='')
|
Loading…
Reference in a new issue