Re: [Tutor] [tutor] creating list of tuples

2008-02-26 Thread Alan Gauld
"Varsha Purohit" <[EMAIL PROTECTED]> wrote One small point. > for x in file: >value=0 >tup = () There ia no point in creating an emnpty tuuple. Tuples are immutable so this tuple will simply be thrown away. It doesnm't do much harm, but it does no good either. >

Re: [Tutor] [tutor] creating list of tuples

2008-02-25 Thread Varsha Purohit
I think i got it i m creating a tuple of 2 elements everytime and i m adding it to a list. i m creating a new tup everytime and adding it to a list for x in file: value=0 tup = () for developerAgent in developers: #print developerA

Re: [Tutor] [tutor] creating list of tuples

2008-02-25 Thread Kent Johnson
Varsha Purohit wrote: > Hello all, >In my application i have to create a list of tuples. I have a for > loop which will create (x,y) tuple each time it iterates, and i ahve to > store each tuple in a list like > > list1= [(x1,y1), (x2,y2).] > > any ideas how to do that ??? list1 =

[Tutor] [tutor] creating list of tuples

2008-02-25 Thread Varsha Purohit
Hello all, In my application i have to create a list of tuples. I have a for loop which will create (x,y) tuple each time it iterates, and i ahve to store each tuple in a list like list1= [(x1,y1), (x2,y2).] any ideas how to do that ??? thanks, -- Varsha Purohit, Graduate Student __