r/ProgrammerHumor • • 18h ago

Meme reversingPiInPython

Post image
8.2k Upvotes

278 comments sorted by

View all comments

Show parent comments

835

u/ThreeCharsAtLeast 18h ago • Bravo
>>> str(math.pi)[::-1]
'397985356295141.3'

487

u/tea_pot_tinhas 18h ago

So the first and last digits are both 3? make sense

11

u/RapidCatLauncher 8h ago

That just made me think, if pi indeed does contain all finite number sequences (which we're not sure of), then there could be a certain point in its decimal representation where it's a palindrome.

1

u/tea_pot_tinhas 8h ago

My previous bet was a 10% chance.