HTH
wat i ment is like i have
x = [1, 2, 3, 4, 5]
y = [2, 3, 4, 5, 1]
and i want x and y as a string
and i want to write it to a file so its like
1 2 3 4 5
2 3 4 5 1
sorry about that misunderstandingOn 8/25/06, John Fouhy <[EMAIL PROTECTED]> wrote:
On 26/08/06, Amadeo Bellotti <[EMAIL PROTECT
On 26/08/06, Amadeo Bellotti <[EMAIL PROTECTED]> wrote:
> I need to convert a list of intgers to a string so for example
>
> I have this
> x = [1, 2, 3, 4, 5, 6]
>
> I want this
>
> x = "1 2 3 4 5 6"
Actually, I disagree with David's solution somewhat --- I think that
the pythonic way to do th
thank you and like wat if i wanna write one string on one line and another string on another line ect.On 8/25/06, David Heiser <
[EMAIL PROTECTED]> wrote:
This
will work
x = [1, 2, 3, 4, 5,
6]
x = str(x)[1:-1].replace(",",
'')
open("filename.txt",
"w").write(x)
-Original
I need to convert a list of intgers to a string so for example
I have this
x = [1, 2, 3, 4, 5, 6]
I want this
x = "1 2 3 4 5 6"
I need this to write it to a .txt file does anyone know how to do this?
___
Tutor maillist - Tutor@python.org
http://mail