fork download
  1. # your code goes here
  2.  
  3. ListA = ["A", "Q", "V", "B", "G", "D", "F", "R", "T", "B", "G", "S", "Q"]
  4. ListB = ["B", "G", "D", "F", "R", "T"]
  5.  
  6. for x in range(0, len(ListA)):
  7. if ListA[x:len(ListB)+x] == ListB:
  8. print("Ful Match", ListA[x:len(ListB)+x])
  9. print("Positions", "{}:{}".format(x, len(ListB)+x))
  10. break
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
Ful Match ['B', 'G', 'D', 'F', 'R', 'T']
Positions 3:9