All problems
MediumFunctions
Lambda — sort by length
Sort a list of words by length (shortest first) using a lambda.
- #lambda
- #sort
Sample input
["mango", "apple", "fig", "guava"]
Sample output
['fig', 'apple', 'mango', 'guava']
lambda-sort.py
Output
Press "Run code" to execute.
