> strgOutput=",".join(str(i) for i in LotNumbers) #??converting list
> to string to store it.
note that here, you are *not* converting the list to a string to store
it. you are converting each list member to a string and creating a
new "list" (actually generator [expression]) for the st
"Moedeloos Overste" <[EMAIL PROTECTED]> wrote
> One question: When I run the program from IDLE it writes the data to
> file
> but when I run it from the command prompt(win32) it doesn't. why is
> this?
How do you know? Have you searched for the file?
Or are you looking in the same file that ID
string to file
fout.close()
vDraws = vDraws - 1
>From: "Andreas Kostyrka" <[EMAIL PROTECTED]>
>Reply-To: "Andreas Kostyrka" <[EMAIL PROTECTED]>
>To: "Moedeloos Overste" <[EMAIL PROTECTED]>
>CC: tutor@python.org
>Subje
Hi,
I am not sure what 'random' does (what package is it from?), but
list=['1','2','3']
slist=','.join(list)
works, while
list=[1,2,3]
slist=','.join(list)
does not. It appears 'join' only works on lists (and maybe tuples?) of
string objects and the list must be passed in as an argument. Tr
",".join(str(x) for x in intList)
Andreas
_ Ursprüngliche Mitteilung _
Betreff: [Tutor] Newbie question: join() string method
Autor: "Moedeloos Overste" <[EMAIL PROTECTED]>
Datum: 27. November 2006 13:20:41
Hi,
I'm trying to use the joi
Hi,
I'm trying to use the join() method on a list to be able to store the
contents of that list in a file. Basically I want the contents of the list
stored without the []. I've tried numerous ways of using the join() method,
but they all return errors. I've tried using the tutorial and document