Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with a call
#2
I haven't tested this, but it should work:
def is_ordered(self):
    deck = self.deck
    return all(deck[n] <= deck[n+1] for n in range(len(deck)-1))
Reply


Messages In This Thread
help with a call - by PyPy - Nov-23-2019, 08:52 PM
RE: help with a call - by Larz60+ - Nov-23-2019, 11:27 PM
RE: help with a call - by Gribouillis - Nov-24-2019, 08:33 AM
RE: help with a call - by PyPy - Nov-24-2019, 11:24 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020