Re: [Tutor] Making String

2010-08-11 Thread Joel Goldstick
On Tue, Aug 10, 2010 at 6:22 PM, Steven D'Aprano wrote: > On Wed, 11 Aug 2010 06:09:28 am Joel Goldstick wrote: > > The str part of str.join() is the string where the result is stored, > > so you can start off with an empty string: "" > > I don't understand what you mean by that. I can only imagin

Re: [Tutor] Making String

2010-08-10 Thread Steven D'Aprano
On Wed, 11 Aug 2010 06:09:28 am Joel Goldstick wrote: > The str part of str.join() is the string where the result is stored, > so you can start off with an empty string: "" I don't understand what you mean by that. I can only imagine you think that the string part is a fixed-width buffer that has

Re: [Tutor] Making String

2010-08-10 Thread Corey Richardson
Joel and Hugo: Thanks a lot! That clears it right up. ~Corey Richardson ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Making String

2010-08-10 Thread Joel Goldstick
On Tue, Aug 10, 2010 at 3:49 PM, Corey Richardson wrote: > Hello, tutors. > > I'm attempting to make a string from the items of a list. > For example, if the list is ["3", "2", "5", "1", "0"], I desire the string > "32510". > > a = ["3", "2", "5", "1", "0"] my_string = "".join(a) Or, this even w

Re: [Tutor] Making String

2010-08-10 Thread Hugo Arts
On Tue, Aug 10, 2010 at 2:49 PM, Corey Richardson wrote: > Hello, tutors. > > I'm attempting to make a string from the items of a list. > For example, if the list is ["3", "2", "5", "1", "0"], I desire the string > "32510". > > I've looked into str.join(), but I can't figure it out. Can someone ei

[Tutor] Making String

2010-08-10 Thread Corey Richardson
Hello, tutors. I'm attempting to make a string from the items of a list. For example, if the list is ["3", "2", "5", "1", "0"], I desire the string "32510". I've looked into str.join(), but I can't figure it out. Can someone either point me in a different direction, or explain how join() work