May-17-2017, 03:09 PM
My clunky solution:
def rev(): my_input = input("Please input what you want to reverse: ") my_output = my_input.split() new_list = [] for word in my_output: new_list.append(word[::-1]) reversy = " ".join(new_list) print(reversy) rev()Output:
Output:C:\Python36\python.exe C:/Python/Gui/tkinter/raspi/scratch1.py
Please input what you want to reverse: Python forum
nohtyP murof
Process finished with exit code 0
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition