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 written a program that flips a coin 1000 times and records it all in a dictionary, like this: # 0 = heads, 1 = tails flips = [0,0,0,1,0,1,0,0,1,1,1,1,1,0,0,1,0,1,0,1,0,1] 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've thought about this, and it seems like regular expressions would be needed. Can someone help/hint? Thanks in advance! _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor