For the same reason as >>> "".count("") 1 >>> "ab".count("") 3 This is counting slice positions, which is one more that the length of the string.