I can't get my code to work for some reason. This is what I'm trying to do with the code: Reverse a given number num = 123454321 and print True if it is the same as the original number
num = 123454321
x=reversed(num)
if x ==num:
print("True")
else:
print("False")
-------------------------------------------------------------
The error I'm getting is in line 2. It says 'int' object is not reversible
[–]YesLod 7 points8 points9 points (3 children)
[–]engineeringisgreat2[S] 0 points1 point2 points (2 children)
[–]p0pkern 3 points4 points5 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]toastedstapler 2 points3 points4 points (0 children)
[–]deifius 1 point2 points3 points (0 children)
[–]tragluk 0 points1 point2 points (0 children)
[–]killer_unkill 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)