0
Hello can someone help me understand this well?
code = input()[::-1] spell = "" letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', ' ' ] for i in range(len(letters)-1): letters.append(letters[i].upper()) for i in code: if i in letters: spell += i print(spell)
2 Respuestas
+ 2
Your code basically, takes an input as a string. If the string includes the given letters, reverses it and print the reversed string.
I hope, it's clear. Happy coding!
+ 1
Thank you. I will look into it