I am not able to sort the list using any of the variables as a key. I know about the ‘key=’ parameter but how should i pass ‘a’ or ‘b’ to it?
Question 9 in ML Assignment 0
hey @A18ML0031,
try using this sorted(objects,key=lambda x:x.b).
I hope this helps you.
Thank You. .