I have a list containing only
False values. I am looking for a pattern when the elements of the list changes from
False or vise versa more than 3 times.
Example (T is used for
True and F for
False for abbreviation):
List = [T, T, T, F, F, F, T, F, T, F, T, T, T, T]
What I want to detect is :
[F, T, F, T, F, T] and its starting index in the original list.
If fact, I need this detection to be done in real-time. I mean, the
List is being made by getting data from another source (timestamp is 0.5 second). And I need to detect the above mentioned pattern in the
In you are aware how to solve this problem (either real time or not), please let me know.