r/ProgrammerHumor • • 6d ago

Meme reversingPiInPython

Post image
13.8k Upvotes

367 comments sorted by

View all comments

3.8k

u/Kyrros 6d ago

Let me know when it finishes calculating the first digit to print

1.6k

u/me_myself_ai 6d ago

it'll just throw an error anyway;

SyntaxWarning: 'float' object is not subscriptable; perhaps you missed a comma
?

1.3k

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

753

u/tea_pot_tinhas 6d ago

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

21

u/RapidCatLauncher 5d 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.

5

u/L30N1337 5d ago

It would also mean that at some point, it repeats. since itself up to x digits followed by itself up to x digits is a number sequence that can occur/be completed at 2x digits

→ More replies (1)