In Python, double forward slash (//) is used for floored division, which means:
- Numbers are divided first, and then;
- Rounded down (or floored) to the nearest integer.
Using x // y is equivalent to floordiv(x, y).
You can draw the comparison between true division and floored division in the following examples:
// floored division
num = 9 // 5
print(num) # 1
print(type(num)) # <class 'int'>
// division
num = 9 / 5
print(num) # 1.8
print(type(num)) # <class 'float'>