I am wanting to check if a list has a specific sequence of elements. I have sorted the list which contains 7 elements, I now want to check of the first 4 are the same as each other and the last 3 are the same as each other.
For what I want to achieve to be True the list would be like this:
list = ['1','1','1','1','2','2','2']
I hope this makes what I want to achieve clearer.