Python starmap Iterator

Python starmap(func,list[]) iterator run the function func using the list elements as parameters.

>>> from itertools import *
>>> x = starmap(max,[[5,14,5],[2,34,6],[3,5,2]])
>>> for i in x:
>>> print (i)
14
34
5






















endmemo.com © 2024  | Terms of Use | Privacy | Home