Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,7 @@
with open('xxx.txt') as f:
for i, line in enumerate(f):
if i == 6:
break
else:
print('Not 7 lines in file')
line = None

View file

@ -0,0 +1,7 @@
from itertools import islice
with open('xxx.txt') as f:
try:
line = next(islice(f, 6, 7))
except StopIteration:
print('Not 7 lines in file')

View file

@ -0,0 +1 @@
print open('xxx.txt').readlines()[:7][-1]