beginer question of list comprehensions
Echo
oshecho at gmail.com
Thu Mar 23 14:08:47 EST 2006
Ok, this is the first list comprehension that I have done.
Surprisinly, it works for the most part.
The problem with it is that it returns a list with two lists in it,
instead of just one list. Can anyone tell me what I am doing wrong or
how to fix it.
Here is my code:
[t for t in (__import__(m, globals(), locals(), m).BizObjects() for m
in table_files)]
"table_files" is a list with two module names
"__import__(m, globals(), locals(), m).BizObjects()" is a list of
objects gotten from the module.
--
-Echo
More information about the Python-list
mailing list