Ah, brilliant -- yes, this is so much more elegant in Python: #now cut the cards x = random.randrange(2,range(13 * 4 * decks)) cards = cards[x:]+cards[:x]