This is the case in all programming languages not just Python (although the details sometimes differ).
For a very technical explanation, see What Ever Computer Scientist Should Know About Floating-Point Arithmetic.
See also this visual explanation.
This is the case in all programming languages not just Python (although the details sometimes differ).
For a very technical explanation, see What Ever Computer Scientist Should Know About Floating-Point Arithmetic.
See also this visual explanation.