Mega Code Archive

 
Categories / Python Tutorial / Buildin Function
 

Map(None, list1, list2) is a convenient way of turning a pair of lists into a list of pairs

seq = range(8) def square(x): return x*x print map(None, seq, map(square, seq))