
February 24th, 2013, 06:29 AM
|
 |
Contributing User
|
|
Join Date: Nov 2012
Location: Iran / France
|
|
And if you don't want to use regular expressions for this problem, another solution could be this
Code:
def checkForLetters(p_text):
l_lettersList = ["a", "e", "i", "o", "u", "y"]
l_lowerTxt = p_text.lower()
return (
l_lowerTxt[0] in l_lettersList and
l_lowerTxt[-1] in l_lettersList
)
Regards,
Dariyoosh
|