I am working with user input in my code, but need to make certain conditions to run the programme. The user needs to enter a sentence with all vowels censored with an asterisk. I want to then check if they accidentally entered vowels too, eg. h*llo is not good. I tried the following:
for x in inputword:
if x == 'a' or 'e' or 'i' or 'o' or 'u':
print('Enter a sentence with no vowels')
return
The problem is, if they now enter h**ll* or something that should be okay, the code above still gets triggered.... how to fix this?