본문 바로가기
나는 이렇게 학습한다/Algorithm & SQL

1214. Find the position!

by daco2020 2022. 12. 14.

When provided with a letter, return its position in the alphabet.

Input :: "a"

Ouput :: "Position of alphabet: 1"



Solution:

def position(alphabet):
    return f"Position of alphabet: {ord(alphabet)-96}"