Share your repls and programming experiences

← Back to all posts
#WEEKLY
h
Codemonkey51 (794)

my weekly submission :)

EDIT: this has to be 50 characters long so I added this part :)

Commentshotnewtop
Scoder12 (642)

I'm pretty sure you don't have to convert it back to negative.

Codemonkey51 (794)

Negatives are considered palindromic so a - number would be closer to the negative than the positive version @Scoder12

Scoder12 (642)

@Codemonkey51 yeah but the number of digits can't be negative

Scoder12 (642)

Why didn't you use the built-in reversed function

Codemonkey51 (794)

I didnt know that existed also just looked it up it returns a list :/ @Scoder12

Scoder12 (642)

@Codemonkey51 yeah, this does the exact same thing as your reverse function: return int(''.join(reversed(str(n))))

lighteningboltb (21)

what is this i don't understand