[Tutor] Detecting sequences in lists
tinoloc at gmail.com
Mon Aug 27 15:20:53 CEST 2007
Thank you so much for the information on sets. I think that that has
certain uses, but in my case I can't find a way. I have been thinking about
sequences in a list. Let me give you an example:
tset = [ 1,2,4,0,0,1,2,4,4]
What I want to do is detect the 1,2,4 sequence and perhaps how many.
What I have tried is
[1,2,4] in tset
Is there a method or a function that does this in python, or am I left with
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor