title: can I condense this?
body: <pre><code>invalid_characters = [&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;0&quot;]
  vowels = [&quot;a&quot;,&quot;e&quot;,&quot;i&quot;,&quot;o&quot;,&quot;u&quot;]
  
  letter = str(input(&quot;Enter a letter: &quot;))
  while letter in invalid_characters:
      letter = input(&quot;You entered an invalid character. Please enter a letter: &quot;)
  if letter in vowels:
      print(&quot;The letter is a vowel&quot;)
  else:
      print(&quot;The letter is a consonant&quot;)
  
  </code></pre>