All pastes #746880 Raw Edit

Anonymous

public python v1 · immutable
·published 2007-10-23 15:41 UTC
rendered paste body
>>> names = ["vincent", "etienne", "joel"]>>> new_names = map(lambda s: [s, s.upper()], names)>>> new_names[['vincent', 'VINCENT'], ['etienne', 'ETIENNE'], ['joel', 'JOEL']]>>> new_names[0]['vincent', 'VINCENT']>>> map(lambda x: x[0], new_names)['vincent', 'etienne', 'joel']>>>