Problem of function calls from map()

Tim Lesher tlesher at gmail.com
Mon Aug 21 10:18:32 EDT 2006


Dasn wrote:
> So how to put '\t' argument to split() in map() ?

How much is the lambda costing you, according to your profiler?

Anyway, what you really want is a list comprehension:

l = [line.split('\t') for line in lines]




More information about the Python-list mailing list