I'm trying to write a python script to find patterns in a list.
Eg. Given this list
[1,2,3,4,5,6,4,5,6,4,5,6,4,5,6]
The script would determine that 4,5,6 ocurred 3 times and then print out
3 (4,5,6)
I was hoping if anyone had any insights algorithmically (I can only think of n^2 algorithms where I check for patterns of size 1, then 2, then 3, etc iterating through the string each time) or if there might be any Python built-in libraries which might help do the same things. Thanks!