Advertisement
molnarjani

Untitled

May 29th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. class Tetel:
  2. def __init__ (self, f):
  3. self.lista = []
  4. f = f
  5. with open(f) as f:
  6. for l in f:
  7. self.lista.append(int(l))
  8.  
  9. def osszegez (self):
  10. query = sum(self.lista)
  11. return query
  12.  
  13. def maxker (self):
  14. query = max(self.lista)
  15. return query
  16.  
  17. def feltmaxker (self, f):
  18. query = max(filter(f, self.lista))
  19. return query
  20.  
  21. def szamlal (self, f):
  22. query = filter(f, self.lista)
  23. return query.__len__()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement