Changed beyond recognition

Report a typo

Dany created the following list:

dragons = ['Rudy', 'Targent', 'Aggie']

and then played with it for a while. She performed some operations on it, so the result looks like this:

['Targent', 'Aggie', 'Rudy']

Now Dany is confused and wants to understand what exactly she has done. Help her out! Place the operations in the correct order – the order in which they were used to get ['Targent', 'Aggie', 'Rudy'] from ['Rudy', 'Targent', 'Aggie'].

Put the items in the correct order
dragons = sorted(dragons, key=len)
dragons.reverse()
dragons.sort()
___

Create a free account to access the full topic