I can't figure out the problems , please give me some advice:blush:
Refer to how you would do it manually, break that down into things you know how to do in python.
If there's trouble doing that, then identify what that trouble is, and then think about how you can figure that out, for example by revisiting an earlier exercise, googling, or asking
I think my code is right, but it can't get right outcome. I don't know where are the problems. Could you help me out?
text_list = list(text)
for x in text_list: if x.lower() in "aeiou": text_list.remove(x) return "".join(text_list)
If you print out
x each iteration, you'll find that removing elements from
text_list interferes with iterating through it (because you're causing the elements that follow to move)
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.