0
How to remove vowels in a string using one while loop and one or a couple of if statements ?
Please do not use functions
2 Antworten
+ 3
vows="A E I O U a e i o u".split()
myString="This is my string"
cleaned=[print(i,end='') for i in myString if i not in vows]
I know, not a while loop or if statements, but it's a good way
+ 2
vowel array {a,e,I,o,u}
while (end of string reached)
if char at index i of input string present in vowel array
skip
else
include char in string