fork download
  1. def exists(a,b):
  2. i=0
  3. j=0
  4. cnt=0
  5. while i<len(a) and j<len(b):
  6. if a[i]==b[j]:
  7. i+=1
  8. j+=1
  9. cnt+=1
  10. else:
  11. i+=1
  12.  
  13. if cnt==len(b):
  14. return True
  15. else:
  16. return False
Success #stdin #stdout 0.08s 7924KB
stdin
Standard input is empty
stdout
Standard output is empty