我期待下面的代码中的元音免费字符串,但它没有给我我期待的东西.请帮忙.
def disemvowel(word):
words = list(word)
for i in words:
if i.upper() == "A" or i.upper() == "E" or i.upper() == "I" or i.upper() == "O" or i.upper() == "U":
words.remove(i)
return print(''.join(words))
disemvowel("uURII")
Run Code Online (Sandbox Code Playgroud)
我期待输出为'R',但我得到'URI'.