0

I have a list called agents containing Agent objects. Each object has a solved property which is a list, for example:

Agent.solved = [300, 50, 100, 7]

The length of each list is different. I want to print results like this but I want the output ordered by the length of the solved property. How can I sort it that way?

for _id, obj in agents.items():
  print(obj, 'solved', len(obj), 'tickets')
Elliott B
  • 980
  • 9
  • 32

0 Answers0