fork download
  1. text = "This is the string with the word 'the' in it."
  2.  
  3. for i in range(len(text) - 1):
  4. if text[i:i+2] == "th":
  5. print("th")
Success #stdin #stdout 0.04s 9588KB
stdin
Standard input is empty
stdout
th
th
th
th