Advertisement
molnarjani

Untitled

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