I am trying to find a way to detect a sequence of strings in a list.
I.E.: for the list
List1 = ["A", "B", "C", "D", "E"],
how do I write a program that detects the sequence
"A", "B", "C" and returns / prints "True"?
Thank you!
List1 = ["A", "B", "C", "D", "E"]
Axiom = "A", "B" (I am aware that this is a tuple, and therefore would not be detected)
for item in List1:
if List1[0]==Axiom:
print("True")
Expected Output:
True