Guest User

Untitled

a guest
Jan 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. your_string[i:i+len(substring)]
  2. # where `i` is the index
  3.  
  4. >>> your_string = 'abcd'
  5. >>> your_string[0:0]
  6. ''
  7.  
  8. >>> your_string.find('')
  9. 0
  10.  
  11. # Because your_string[0:0] == ''
  12. # ^ this being the index returned
Add Comment
Please, Sign In to add comment