Re: [Tutor] Converting a numerical variable into a string variable

2009-02-12 Thread Shawn Milochik
>>> for x in range(1,9): print("G%dBF" % (x,)) G1BF G2BF G3BF G4BF G5BF G6BF G7BF G8BF >>> ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Converting a numerical variable into a string variable

2009-02-12 Thread Sander Sweers
On Thu, Feb 12, 2009 at 21:06, Andres Sanchez wrote: > Please, give me a hand with this. Say I have a vector defined as > x=[1,2,3,4,...,9]. I need to write string variables with the names > G1BF...G9BF. Thus, the first string variable would be 'G'+'1'+'BF', being > the number 1 equal to x[0]. Now

[Tutor] Converting a numerical variable into a string variable

2009-02-12 Thread Andres Sanchez
Folks, Please, give me a hand with this. Say I have a vector defined as x=[1,2,3,4,...,9]. I need to write string variables with the names G1BFG9BF. Thus, the first string variable would be 'G'+'1'+'BF', being the number 1 equal to x[0]. Now, using a for loop, I want to do something like: