DS160123-Write a program that will reverse a four digit number.Also it checks whether the reverse is true

is it right?
user_input=(input(‘enter any number’))

int(a[::-1])

a=user_input

if a==user_input:

print(‘true’)

else:

print(‘false’)

user_input = input() 
''' int(a::-1) will give you error as a is not defined.'''

a = user_input
a = int(a[::-1]) # you need to store the change when you perform any operation 
# such as reverse or data type conversion
if a == int(user_input): # as user_input is string you need it to be integer
     print('True')
else:
     print('False')

@kharshavardhan31
Going very good :slightly_smiling_face:
Keep it up :slightly_smiling_face: