f.seek example

This commit is contained in:
Mert Gör ☭ 2023-08-26 17:25:14 +03:00
parent ddacee5bcd
commit ebbcf76b9e
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
2 changed files with 5 additions and 2 deletions

3
python-temel/f.seek.py Normal file
View File

@ -0,0 +1,3 @@
with open('test.txt', 'r+') as f:
f.seek(0, 2)
s = f.write('xxx')

View File

@ -1,2 +1,2 @@
mert
gör
0123456789
xxx