Python round() built-in function

From the Python 3 documentation

Return number rounded to ndigits precision after the decimal point. If ndigits is omitted or is None, it returns the nearest integer to its input.

Examples

>>> round(1.4)
# 1
>>> round(1.5)
# 2
>>> round(2.1)
# 2
>>> round(2.9)
# 3
>>> round(2/3, ndigits=3)
# 0.667

Ups! Nothing here yet!

This is a great opportunity for you to collaborate! Hit the link at the end of this page and add some examples and a brief description. If you don't know where to start, the Python 3 documentation will lead you in the right direction.

Subscribe to pythoncheatsheet.org

A two times a month and bullshit free publication, full of interesting, relevant links.