I would like to convert the string to an integers as shown below, separated by "." with a=1,b=2,...z=26
text = 'Hello World"
Expected output:
H.E.L .L. O W. O. R. L. D
---> 8.5.12.12.15 23.15.18.12.4
#split the words
text ="Hello world"
text = text.upper()
splitted_text = text.split(" ")
#map characters to integers
import string
for x, y in zip(range(1, 27), string.ascii_lowercase):
print(x, y)
I don't know how do I proceed from here.