Nov-24-2019, 08:33 AM
(This post was last modified: Nov-24-2019, 08:34 AM by Gribouillis.)
A variation that only supposes that
self.deck
is iterablefrom itertools import tee def is_ordered(self): t = tee(self.deck) next(t[1], None) return all(a <= b for a, b in zip(*t))