converting types

Ludovic Fotin ludovic_nospam_ at fotin.net
Sun May 12 18:07:13 EDT 2002


> hi i know its a pain answering newbie questions
> that to you lot seem really simple

No matter i'm a newbie too !!!

> num = "list is " + number + " long"

try this :
number = len(list)
num = "list is %s long" % number
print num

Look in the man the fonction with %. There is different use. %s (numeric) %d
(string) etc...

Bye

Ludo





More information about the Python-list mailing list