daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Jan 19th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
Top