
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Purpose of the Operator in Python
In Python, // is defined as floor division operator. It returns integer part of a floating point result of division. For example 10//3 returns 3
>>> 10//3 3 >>> 125.5//2.5 50.0 >>> 12.5//1.5 8.0
However in case of negative division, returned value is rounded towards negative infinity.
>>> -10//3 -4 >>> -73//9 -9
Advertisements