1from string import ascii_lowercase
2
3
4LETTERS = {letter: str(index) for index, letter in enumerate(ascii_lowercase, start=1)}
5
6def alphabet_position(text):
7 text = text.lower()
8
9 numbers = [LETTERS[character] for character in text if character in LETTERS]
10
11 return ' '.join(numbers)
12