LOGO
  • Follow Us
  • .NET
    C# C# OOP ASP.NET Core ASP.NET MVC LINQ Inversion of Control Web API
  • JavaScript
    JavaScript TypeScript jQuery Angular 11 Node.js D3.js Sass
  • Programming
    Python Go lang HTTPS (SSL) Regex
  • Database
    SQL SQL Server PostgreSQL MongoDB
  • Assessment
    MCQs Online Tests
  • Articles
  • Tools
    JavaScript Minifier CSS Minifier JSON Beautifier XML Beautifier
  • Python Tutorials
  • Python - Get Started
  • What is Python?
  • Where to use Python?
  • Python Version History
  • Install Python
  • Python - Shell/REPL
  • Python IDLE
  • Python Editors
  • Python Syntax
  • Python Keywords
  • Python Variables
  • Python Data Types
    • Number
    • String
    • List
    • Tuple
    • Set
    • Dictionary
  • Python Operators
  • Python Conditions - if, elif
  • Python While Loop
  • Python For Loop
  • User Defined Functions
    • Lambda Functions
  • Variable Scope
  • Python Modules
    • Module Attributes
  • Python Packages
  • Python PIP
  • __main__, __name__
  • Python Built-in Modules
    • OS Module
    • Sys Module
    • Math Module
    • Statistics Module
    • Collections Module
    • Random Module
  • Python Generator Function
  • Python List Comprehension
  • Python Recursion
  • Python Built-in Error Types
  • Python Exception Handling
  • Python Assert Statement
  • Define Class in Python
  • Inheritance in Python
  • Python Access Modifiers
  • Python Decorators
    • @property Decorator
    • @classmethod Decorator
    • @staticmethod Decorator
  • Python Dunder Methods
  • CRUD Operations in Python
  • Python Read, Write Files
  • Regex in Python
  • Create GUI using Tkinter
  • Python Learning Resources
  • Python API Methods
  • Python Built-in Methods
  • Python String Methods
  • Python List Methods
  • Python Set Methods
  • Python Dictionary Methods

Python - round()

The round() function returns a number, rounded to precision of specified position after decimal point.

>>>round(1234.456,2)
1234.46
>>>round(1234.456,1)
1234.5
>>>round(1234.456,0)
1234.0
>>>round(1234.456, -1)
1230.0
Python Questions & Answers
Start Python Skill Test
Related Articles
  • Compare strings in Python
  • Convert file data to list
  • Convert User Input to a Number
  • Convert String to Datetime in Python
  • How to call external commands in Python?
  • How to count the occurrences of a list item?
  • How to flatten list in Python?
  • How to merge dictionaries in Python?
  • How to pass value by reference in Python?
  • Remove duplicate items from list in Python
  • More Python articles

  • Python Questions & Answers
  • Python Skill Test
  • Python Latest Articles
TutorialsTeacher.com

TutorialsTeacher.com is optimized for learning web technologies step by step. Examples might be simplified to improve reading and basic understanding. While using this site, you agree to have read and accepted our terms of use and privacy policy.

  • Contact Us
E-mail list

Subscribe to TutorialsTeacher email list and get latest updates, tips & tricks on C#, .Net, JavaScript, jQuery, AngularJS, Node.js to your inbox.

We respect your privacy.

2023 TutorialsTeacher.com. All Rights Reserved.
  • HOME
  • TERMS OF USE
  • PRIVACY POLICY
2023 TutorialsTeacher.com. All Rights Reserved.