You are viewing a single comment's thread. Return to all comments →
Super I followed ur way and tried to perform this same operation on list of dict();
marksheet=[]
for _ in range(0,int(raw_input())): d = dict() d['name'],d['score'] = raw_input(),float(raw_input()) marksheet.append(d)
second_lowest = sorted(list(set([score['score'] for score in marksheet])))[1]
print '\n'.join(sorted([a['name'] for a in marksheet if a['score']== second_lowest]))
Seems like cookies are disabled on this browser, please enable them to open this website
Nested Lists
You are viewing a single comment's thread. Return to all comments →
Super I followed ur way and tried to perform this same operation on list of dict();
marksheet=[]
for _ in range(0,int(raw_input())): d = dict() d['name'],d['score'] = raw_input(),float(raw_input()) marksheet.append(d)
second_lowest = sorted(list(set([score['score'] for score in marksheet])))[1]
print '\n'.join(sorted([a['name'] for a in marksheet if a['score']== second_lowest]))