TypeError: 'module object is not callable'

Amit Khemka khemkaamit at gmail.com
Tue Sep 4 06:24:44 EDT 2007


On 9/4/07, Chris.Tidy at jet.uk <Chris.Tidy at jet.uk> wrote:
> Thanks guys. Changing to how Python does things has a lot of geting
> used to!
> Do any of you have any ideas on the best way to do the following
> problem:
>
> Each loop I perform, I get a new list of Strings.
> I then want to print these lists as columns adjacent to each other
> starting with the first
> created list in the first column and last created list in the final
> column.
>
> If you need any more information, just let me know!
> Cheers

If I understand correctly what you may want is:

>>> l =  ['1', '2', '3', '4']

you can do:

>>> print "\t".join(l)  # lookup join method in string module,
assuming "\t" as the delimiter

or,

>>> for i in l:
....     print i, '\t' ,   # note the trailing ","

If this is not what you want, post an example.

Btw, Please post new issues in a separate thread.

Cheers,
-- 
----
Amit Khemka
website: www.onyomo.com
wap-site: www.owap.in



More information about the Python-list mailing list