Kotter's solution works as long as it is also acceptable to respond to yEs, which was not exactly the assignment as laid out. Try using Yoriz's suggestion.
Since your initial attempt used a list I am assuming that the instructor was using this to teach a bit about lists, in which case this works. If instead you were to learn about string case, Kotter's works.
Since your initial attempt used a list I am assuming that the instructor was using this to teach a bit about lists, in which case this works. If instead you were to learn about string case, Kotter's works.