You need to store the count before resetting it since you want
> to know the largest value of count over the list. Or at least keep a
> separate max variable that you update if count > max.
>
Fairly easy:
if Cur_Count > Max_Count:
Max_Count = Cur_Count
See? Just two extra lines of code.
_
"Kent Johnson" <[EMAIL PROTECTED]> wrote
What I want to do, is find out the largest "streak" of digits. In
the
above example, the streak would be 5, because there are 5 tails
flips in
a row.
I would loop through the list with a for loop, keeping track of the
last value seen and the current
On Wed, Oct 1, 2008 at 6:00 PM, Danny Yoo <[EMAIL PROTECTED]> wrote:
>> Regular expressions are for processing strings, not loops.
>
> From a theoretical point of view, this isn't quite true: regular
> expressions can deal with sequences of things.
Sheesh! OK, *Python* regular expressions are for
> Regular expressions are for processing strings, not loops.
>From a theoretical point of view, this isn't quite true: regular
expressions can deal with sequences of things. It's true that most
regular expression libraries know how to deal only with characters,
but that's a matter of specializing
On Wed, Oct 1, 2008 at 4:56 PM, Alec Henriksen <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I thought it'd be cool to write a program for my logic/critical thinking
> class, and right now we're evaluating randomness - and the deception of
> it. A previous post inspired it - coin flipping.
>
> So, I've w