Run »
×
Change Orientation
# A function that returns the length of the value: def myFunc(e): return len(e) cars = ['Ford', 'Mitsubishi', 'BMW', 'VW'] cars.sort(key=myFunc) print(cars)
['VW', 'BMW', 'Ford', 'Mitsubishi']
×
Report a Problem:
Your E-mail:
Page address:
Description:
Submit