I have a list of objects.Every object has an attribute “priority” whose value could be low,medium,high.I would need to sort the list of objects so that objects with priority “high” comes first in list and then objects with priority “medium” and lastly objects with priority “low”.I know I can do this using few for loops , but I want a pythonic solution that is fast and effective.sorry but i am a beginner in python.
I have a list of objects.Every object has an attribute priority whose value could
Share
1 Answer