Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. from zipfile import ZipFile
  2.  
  3. file = ZipFile('files.zip') #otwieramy zipa
  4.  
  5.  
  6. python_files = []
  7. for fold in file.filelist: #dla każdego foldseru z listy plików konkretne działanie
  8. print(fold)
  9. if fold.filename.endswith(".py"): #dla przypadków plików, których nazwa kończy się na ".py"
  10. python_files.append(fold) #dodajemy do tablicy
  11.  
  12.  
  13.  
  14. print(len(python_files)) #długość tablicy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement