Advertisement
molendzik

Odczyt i zapis do pliku - zadanie 2

Dec 9th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. with open('pantadeusz.txt',encoding='ANSI') as file:
  2.     lines = file.readlines()
  3.  
  4. def PrintLine(x):
  5.   if len(lines)> x:
  6.     print(lines[x])
  7.  
  8. PrintLine(8)
  9. PrintLine(12)
  10. PrintLine(60)
  11. PrintLine(98)
  12. PrintLine(104)
  13.  
  14. print(len(lines))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement