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