round()

Built-in FunctionPython 2.0+Beginner

Rounds a number to a given number of decimal places

Quick Info

Documentation
Official Docs
Python Version
2.0+

Learn by Difficulty

Quick Example

python
print(round(3.14159, 2))
print(round(2.5))
print(round(3.5))

round() is a built-in function that rounds a number to a given number of decimal places.

Try in Playground

Tags

builtinfunctioncoremathnumeric

Related Items