Konversi huruf menjadi angka dalam python menggunakan pemahaman daftar
Convert Letters to Numbers in Python using list comprehension
text = "itsmycode"
# elegant way using list comprehension
num_list = [ord(x) - 96 for x in text]
# print the converted letters as numbers in list
print("After converting letters to numbers", num_list)
Gorgeous Gazelle