python difference between round and int
Note: The python implementation changed between 2.7 and 3.x. I corrected the answer accordingly. For the sake of completeness, let me add two more functions to your question and explain the differences between float(int(x)), math.floor(x), round(x) and math.ceil(x). Let’s start with a question: “What integer represents best the number 1.6?” We have two possible answers … Read more