Number of different letters X36667


Statement
 

pdf   zip

A code to compute the number of different letters a word has is desired. Write a function @num_dif_letters_list(f)@ that provided a list of words ff returns a list of numbers. Each number in the result list has to be the number of different letters of the corresponding word in ff. All words in ff consists of lowercase letters.

Sample session

Sample session
>>> num_dif_letters_list(['alea', 'iacta', 'est'])
[3, 4, 3]
>>> num_dif_letters_list(['', 'z', 'zz', 'zzz', 'zzzz'])
[0, 1, 1, 1, 1]
>>> num_dif_letters_list([])
[]
>>> num_dif_letters_list(['atalaya', 'orinoco', 'pasas', 'elixir'])
[4, 5, 3, 5]
Information
Author
ProAl
Language
English
Official solutions
Python
User solutions
Python