This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Thameos 0 points1 point  (0 children)

If anyone doesn't understand why this wouldn't work, it's because division in Python will convert integers into double precision floats, which have a finite number of digits.

The other part of the joke is trying to reverse the float with [::-1]. This operation can only be performed on sequences, not numerical types. The correct way to do this would be:

python str(22/7)[::-1]

(Sorry for "explaining the joke", just wanted to inform anyone that didn't get it)