Search Results

Search found 1 results on 1 pages for 'user1714887'.

Page 1/1 | 1 

  • trying to work through a list in sections

    - by user1714887
    I have a list of lists sorted by the second value of the list (the groups). I now need to iterate through this to work on each "group" at a time. the data is [name, group, data1, data2, data3, data4]. I wasn't sure if I need a while or some other sort of loop, or maybe groupby but I've never used that. any help would be appreciated. for i in range (int(max_group)): x1 = [] x2 = [] x3 = [] x4 = [] if data[i][1] == i+1: x1.append(data[2]) x2.append(data[3]) x3.append(data[4]) x4.append(data[5]) print x1 print 'next' # these are just to test where we're at

    Read the article

1