fork download
  1. A=[0,4,0,1,2,3,8,9,0,1,2]
  2. p=[1,2,3]
  3. pkq=-1
  4. i=0
  5. while (i<len(A)-3) and (pkq==-1):
  6. if (A[i]==p[0]) and (A[i+1] == p[1]) and (A[i+2]==p[2]):
  7. pkq=i
  8. else:
  9. i=i+1
  10. if pkq>=0:
  11. print(p,pkq)
  12. else:
  13. print("khong tim thay")
  14.  
  15.  
Success #stdin #stdout 0.11s 14140KB
stdin
Standard input is empty
stdout
[1, 2, 3] 3