transform list of int in a list of string??
jubafre at brturbo.com
jubafre at brturbo.com
Fri Sep 13 15:34:10 EDT 2002
my program have other modules imported, like re and sre and i put a convertion int to str but doesn´t work
t=str(x[i])
Traceback (most recent call last):
File "C:\Documents and Settings\jubafre\Desktop\montador\teste.py", line 78, in ?
t=str(x[i])
TypeError: 'list' object is not callable
Why i can´t transform a int number in string in my program???
I tryed with import string, and can´t too,
but if i start a new python shell it works, why??
python shell
>>> x=[1,2,3,4,]
>>> s=[]
>>> for i in range(len(x)):
t=str(x[i])
s.append(t)
>>> print s
['1', '2', '3', '4']
Juliano Freitas
www.gebrasil.hpg.com.br
More information about the Python-list
mailing list