Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = ':$!U< /|pEOsb |o^ @@+Cz*'#мое решение через списки
- vowel = ['A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u',]
- s1 = list(s)
- for j in vowel:
- for i in s1:
- if j == i:
- s1.remove(i)
- print(''.join(s1))
- for i in "aeiouAEIOU":#подсмотренное решение
- s = s.replace(i, "")
- print(s)
- # результат одинаков, но мое не проходит тесты на codewars, а подсмотренное проходит, почему?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement