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.
More Related Contents:
- How t extract last part of a text in python [duplicate]
- Split Strings into words with multiple word boundary delimiters
- Filter pandas DataFrame by substring criteria
- Why do backslashes appear twice?
- How to get the value of a variable given its name in a string? [duplicate]
- Changing one character in a string
- About the changing id of an immutable string
- Converting a string representation of a list into an actual list object [duplicate]
- How to delete a character from a string using Python
- Remove all special characters, punctuation and spaces from string
- using backslash in python (not to escape)
- Pandas Extract Number from String
- Python str vs unicode types
- python: SyntaxError: EOL while scanning string literal
- n-grams in python, four, five, six grams?
- Finding a substring within a list in Python [duplicate]
- Best way to parse a URL query string
- String exact match
- Python- how do I use re to match a whole string [duplicate]
- Is there a native templating system for plain text files in Python?
- Python: is using “..%(var)s..” % locals() a good practice?
- Setting the fmt option in numpy.savetxt
- Adding backslashes without escaping [duplicate]
- What does “table” in the string.translate function mean?
- How can I check if a string has a numeric value in it in Python? [duplicate]
- How does str.startswith really work?
- Python string operation, extract text between html tags
- get python dictionary from string containing key value pairs
- Mutable and Immutable Strings in python
- Detect whether a Python string is a number or a letter [duplicate]