defimax(iterable,key=lambdax:x):"""returns largest item, as input could take iterator or sequence "key" function will be applied on every item, before comparison is made >>> imax( [12,3,4, 89, 90,88] ) 90 """current_max=Noneforxiniterable:ifcurrent_maxisNoneorkey(x)>key(current_max):current_max=xreturncurrent_max