You can download this code by clicking the button below.
This code is now available for download.
This function takes two arguments, converts them to lowercase, and then converts the ASCII values to corresponding letters, returning a string composed of these two letters.
Technology Stack : Built-in functions (str.lower(), ord(), int)
Code Type : Function
Code Difficulty : Intermediate
def a_to_z(arg1, arg2):
alphabet = 'abcdefghijklmnopqrstuvwxyz'
return alphabet[ord(arg1.lower()) - ord('a')] + alphabet[ord(arg2.lower()) - ord('a')]