If last letter in a word is vowel | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

If last letter in a word is vowel

trying to figure out how can I use lambda and remove any word in input that ends with vowel.

13th Jan 2018, 3:26 PM
svecky
svecky - avatar
1 Réponse
0
Using lambda :) string = input() f = lambda s: s[:-1].upper() if s[-1] in "AEIOU" else s print( f(string) )
13th Jan 2018, 3:56 PM
Sebastián Zapata
Sebastián Zapata - avatar