Python programming questions were asked String related (string manupulation), OOPS related to explain inheritance with an example dictionary related (printing names in order of ages {'santosh':30,'gani':25,'basu':19,'apple':20}).
Anonymous
dictionary related question: take a list and exratct the ages, sort the list and, using a for loop on sorted list print the keys matching the ages in dictionary my_dict = {'santosh':31,'spurti':24,'konark':30,'naveen':32} l = [] for k,v in my_dict.items(): l.append(v) l.sort() for i in l: for k,v in my_dict.items(): if i==v: print(k)
Check out your Company Bowl for anonymous work chats.