input code:
randomlabel = [(random.randint(1,10),i) for i in geneex]
sortlabel = sorted(randomlabel)
store = {}
for i,j in sortlabel:
store.setdefault(i,[])
for i,j in sortlabel:
store[i].append(j)
print store
I got the rather cryptic error message
sortlabel = sorted(randomlabel)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()