Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

int to alphabet letter python

from string import ascii_lowercase


LETTERS = {letter: str(index) for index, letter in enumerate(ascii_lowercase, start=1)} 

def alphabet_position(text):
    text = text.lower()

    numbers = [LETTERS[character] for character in text if character in LETTERS]

    return ' '.join(numbers)
Source by codereview.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #int #alphabet #letter #python
ADD COMMENT
Topic
Name
2+6 =