concept first character in category python

appears as: first character, first characters, The first character
Tiny Python Projects: Learn coding and testing with puzzles and games

This is an excerpt from Manning's book Tiny Python Projects: Learn coding and testing with puzzles and games.

Back to our problem. We need to put either “a” or “an” in front of the word we’re given, based on whether the first character of word is a vowel or a consonant.

2.3.3 Classifying the first character of a word

To figure out whether the article I choose should be a or an, I need to look at the first character of the word. In the introduction, we used this:

>>> word[0]
'o'

I can check if the first character is in the string of vowels, both lower- and uppercase: