Skip to content

Instantly share code, notes, and snippets.

@ZSchneidi
Created September 20, 2012 13:58
Show Gist options
  • Save ZSchneidi/3756088 to your computer and use it in GitHub Desktop.
Save ZSchneidi/3756088 to your computer and use it in GitHub Desktop.
temp = []
for row in map_data.iter("row"):
i = 0
fgroup = 0
group = 0
for value in row.iter("value"):
if(i == 0):
fgroup = int(value.text)
if(i == 1):
group = int(value.text)
i+=1
print str(fgroup)+" and "+str(group)
if fgroup in temp:
temp[fgroup] = group
else:
temp.insert(fgroup, group)
print temp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment