Finding patterns in a list
<p>I'm trying to write a python script to find patterns in a list.</p>

<p>Eg. Given this list</p>

<p>[1,2,3,4,5,6,4,5,6,4,5,6,4,5,6]</p>

<p>The script would determine that 4,5,6 ocurred 3 times and then print out</p>

<p>3 (4,5,6)</p>

<p>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!</p>
