Integer division Python's / performs float division, you can use // for integer division. >>> s = "this is a string" >>> len(s) 16 >>> len(s) / 2 8.0 >>> len(s) // 2 8 #types