これまでの私のコードですが、私はとても迷っているので、私がやりたいことに近いことは何もしません:
vowels = 'a','e','i','o','u','y'
#Consider 'y' as a vowel
input = input("Enter a sentence: ")
words = input.split()
if vowels == words[0]:
print(words)
したがって、次のような入力の場合:
"this is a really weird test"
印刷するだけにしたい:
this, is, a, test
母音が 1 つしか含まれていないためです。