Why empty string is on every string? [duplicate]

This is because the substring of length 0 starting at index 0 in 'python' is equal to the empty string:

>>> s[0:0]
''

Of course every substring of length zero of any string is equal to the empty string.

Leave a Comment