Parallel arithmetic?

Terrance N. Phillip mediocre_person at hotmail.com
Thu Aug 4 21:59:33 EDT 2005


Thank-you very much for all the excellent replies. I'm thinking of using 
this to determine if a sequence is a "run" (as in a card game). If I've 
got a sorted hand [3, 4, 5, 6, 7], then I know I've got a 5-card run 
because [4, 5, 6, 7] - [3, 4, 5, 6] == [1, 1, 1, 1]. I want to avoid 
something like
if h[0] == h[1]-1 and h[1] == h[2]-1 ...

Nick.



More information about the Python-list mailing list