Hi everybody
I have a simple newbie kind of questions. I have tried hard to solve it, but couldn't figure it out.
The problem is,
I want to make a tuple of tuples or a list of lists in a iterative fashion in the following format. For example,

a=[[1,],[2,],[3,],[4,],[5,]]

or

a=((1,),(2,),(3,),(4,),(5,))

I need the comma since it is going into an excel sheet.
I tried
a=[]
for i in range(5):
    a.append('['+str(i)+','+']')
but it gives me,
['[0,]', '[1,]', '[2,]', '[3,]', '[4,]', '[5,]']
Which is no good since excel reads the whole thing inside the ' '
instead of the actual number.

I know the solution is probably simple and I appreciate any help.
Thanks
Rama


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to