Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Tetel:
- def __init__ (self, fajl, _lista=[]):
- with open(fajl) as _fajl:
- for l in _fajl: _lista.append(l)
- self.lista = map(int, tuple(_lista))
- def osszegez (self):
- query = sum(self.lista)
- return query
- def maxker (self):
- query = max(self.lista)
- return query
- def feltmaxker (self, f):
- query = max(filter(f, self.lista))
- return query
- def szamlal (self, f):
- query = filter(f, self.lista)
- return query.__len__()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement