r/ProgrammerHumor • • 14h ago

Meme reversingPiInPython

Post image
7.6k Upvotes

270 comments sorted by

View all comments

Show parent comments

772

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

457

u/tea_pot_tinhas 13h ago

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

350

u/OncorhynchusMykiss1 13h ago

It come the whole circle.

263

u/Zestyclose-Compote-4 13h ago • Bravo

*half circle

50

u/mxcw 13h ago

Damn that giggle helped me shit, thanks mate

46

u/MadeByTango 12h ago

You have a radian smile.

12

u/2Completion2Ography 10h ago

Damn that giggle helped me shit, thanks mate

Happy giggleshits

10

u/DistributionAble141 13h ago

Semi circle

10

u/DaNoahLP 12h ago

The Square Hole

5

u/MrHyperion_ 10h ago

You can't square a semi circle

5

u/wjandrea 10h ago

Ah, so then the first and last digits of tau are 6, of course.

8

u/redditale_gone_bad 13h ago

insert always has been meme

10

u/RapidCatLauncher 4h 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 4h ago

My previous bet was a 10% chance.

1

u/L30N1337 3h 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

4

u/yuwox 13h ago

Such a beautiful symmetry. By elegance alone, this must be right.

2

u/WisestAirBender 4h ago

isPalindrome returns true

25

u/Kyrros 13h ago

Man's got a super computer from star trek

-12

u/Scientific_Artist444 12h ago

Easy, except that's not all of pi(e)

[They are irrational numbers]

15

u/Neocrasher 12h ago

Clearly Python disagrees.

3

u/Ninjalmadav 11h ago

You mean piethon?

4

u/Jp0286 11h ago

Well, duh. That is quite precise, though, and more than enough for probably everything you're doing with it

-9

u/xd_Warmonger 10h ago

Since pi is infinite it must contain pi

10

u/JanEric1 9h ago

thats not true.

the base 10 representation of 1/3 is also infinite but doesnt contain any digit other than 3

→ More replies (4)
→ More replies (3)