0

Why isn't it working properly??

a = list(input().lower()) for i in a: if i == "a" or i == "e" or i == "i" or i == "o" or i == "u": a.remove(i) print(' '.join(a))

5th Aug 2021, 8:53 AM
Shahir
Shahir - avatar
5 ответов
+ 4
Does it check for capital "AEIOU"?
5th Aug 2021, 8:55 AM
Abhay
Abhay - avatar
+ 2
Removing item from an iterable while iterating it is cause of the problem. txt = input() for char in "AEIOUaeiou": txt = txt.replace( char, "" ) print( txt )
5th Aug 2021, 10:01 AM
Ipang
+ 1
Ok. Wait
5th Aug 2021, 9:01 AM
Shadoff
Shadoff - avatar
5th Aug 2021, 9:02 AM
Shadoff
Shadoff - avatar
0
Thanks! But why my code isn't working properly??
5th Aug 2021, 9:35 AM
Shahir
Shahir - avatar