John Machin [EMAIL PROTECTED] wrote:
On Oct 15, 4:02 am, Abandoned [EMAIL PROTECTED] wrote:
Hi..
I have a list as a=[1, 2, 3 ] (4 million elements)
and
b=,.join(a)
than
TypeError: sequence item 0: expected string, int found
I want to change list to a=['1','2','3'] but i don't want to
On Tue, 16 Oct 2007 06:18:51 +, Tim Roberts wrote:
John Machin [EMAIL PROTECTED] wrote:
On Oct 15, 4:02 am, Abandoned [EMAIL PROTECTED] wrote:
Hi..
I have a list as a=[1, 2, 3 ] (4 million elements)
and
b=,.join(a)
than
TypeError: sequence item 0: expected string, int found
I
Marc 'BlackJack' Rintsch wrote:
On Tue, 16 Oct 2007 06:18:51 +, Tim Roberts wrote:
John Machin [EMAIL PROTECTED] wrote:
On Oct 15, 4:02 am, Abandoned [EMAIL PROTECTED] wrote:
Hi..
I have a list as a=[1, 2, 3 ] (4 million elements)
and
b=,.join(a)
than
TypeError: sequence
Abandoned [EMAIL PROTECTED] wrote:
Hi..
I have a list as a=[1, 2, 3 ] (4 million elements)
and
b=,.join(a)
than
TypeError: sequence item 0: expected string, int found
I want to change list to a=['1','2','3'] but i don't want to use FOR
because my list very very big.
I'm sorry my
Hi..
I have a list as a=[1, 2, 3 ] (4 million elements)
and
b=,.join(a)
than
TypeError: sequence item 0: expected string, int found
I want to change list to a=['1','2','3'] but i don't want to use FOR
because my list very very big.
I'm sorry my bad english.
King regards
--
1. Use a generator expression:
b = ,.join(str(i) for i in a)
or
2. Use imap
from itertools import imap
b = ,.join(imap(str, a))
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 15, 4:02 am, Abandoned [EMAIL PROTECTED] wrote:
Hi..
I have a list as a=[1, 2, 3 ] (4 million elements)
and
b=,.join(a)
than
TypeError: sequence item 0: expected string, int found
I want to change list to a=['1','2','3'] but i don't want to use FOR
because my list very very