Mirror Word ๐ช
Time for one of Python's coolest party tricks: reversing a string.
word = "banana"
print(word[::-1]) # โ ananab
That [::-1] is called a slice. The -1 means "walk through it
backwards, one letter at a time." It works on any string. ๐
print("stop"[::-1]) # โ pots
Your mission
Take the word stressed, print it backwards, and find out what
programmers have always known: it's the sweetest word in the dictionary. ๐ฐ
Your code
Press โถ Run to see what your code does!