Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- your_string[i:i+len(substring)]
- # where `i` is the index
- >>> your_string = 'abcd'
- >>> your_string[0:0]
- ''
- >>> your_string.find('')
- 0
- # Because your_string[0:0] == ''
- # ^ this being the index returned
Add Comment
Please, Sign In to add comment