Apr-29-2020, 09:51 AM
(This post was last modified: Apr-29-2020, 09:51 AM by pyzyx3qwerty.)
You can do this :
num1 = input("Please enter a 4-digit number : ") num2 = num1[::-1] print(num2)And output :
Output:Please enter a 4-digit number : 1234
4321
pyzyx3qwerty
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs