-1

How is it different than "/"? I tried print 10//5 and print 10/5 and both gave the same result.

user0
  • 653
  • 1
  • 7
  • 11

1 Answers1

0

Try:

print 10.0/6
print 10.0//6

The first is regular division, which results in a floating-point number, whereas the latter is integer division, which truncates the decimal part.

synchronizer
  • 1,955
  • 1
  • 14
  • 37