How to ensure the user entered a valid word?


x=raw_input('enter the word')
if len(x)>0:
print y+z+'ay'
print'Type again'

above is my code
i pass the test,but i can't ensure the user input the valid word
what should i do?


For the purposes of the exercise any string made up of letters would be considered valid.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.