fork(1) download
  1. s=input()
  2. t=input()
  3. count=0
  4. a=s.find(t)
  5. if a==-1:
  6. print (0)
  7. else:
  8. print (a)
  9. while a>-1:
  10. s=s[a+len(t):]
  11. a=s.find(t)
  12. count+=1
  13. print (count)
Success #stdin #stdout 0.03s 9656KB
stdin
hello there
e
stdout
1
3