cards = range(52)
shuffled = []
while len(cards)>0:
shuffled.append(random.choice(cards))
cards.remove(shuffled[-1])
return shuffled
which should be, given a good randomness, literally equivalent to drawing randomly from a pool of 52 cards to form a deck. Is this somehow less efficient than their algorithm?