Python's print method is actually fairly clever picking the "nicest" representation that's still correct.
https://docs.python.org/2/tutorial/floatingpoint.html#tut-fp...
Quote:
"In current versions, Python displays a value based on the shortest decimal fraction that rounds correctly back to the true binary value, resulting simply in ‘0.1’."