Here is my solution for a problem where you want to convert all the letters in a string with position of those letters in English alphabet and return a string of those nos.
https://gist.github.com/bondnotanymore/e0f1dcaacfb782348e74fac8b224769e
Let me know if you want to understand it in detail.I have used the following concepts - List comprehension - Dictionary comprehension