Lowercase list X33694


Statement
 

pdf   zip   main.py

html

Write a function lclist that receives a list ls of nonempty words and returns a list formed by those words in ls that consist only of lowercase letters. The result must be ordered alphabetically (according to the usual order of strings).

Sample session
>>> lclist(['En', 'un', 'lugar', 'de', 'La', 'Mancha'])
['de', 'lugar', 'un']
>>> lclist(['abc', 'aBc', 'deFg', 'defg', 'hijk', 'hijK'])
['abc', 'defg', 'hijk']
>>> lclist(['x', 'X', 'x', 'X', 'x'])
['x', 'x', 'x']
Information
Author
José Luis Balcázar
Language
English
Official solutions
Python
User solutions
Python