我做了一个自定义类作为练习,一副纸牌。我有一个函数可以用random.shuffle()函数对它进行混洗,但是我似乎不能让sort()工作,我知道我可以只重建牌组,但是如果我在排序之前从牌组中取出卡片,这就不起作用了。sort()和sorted()是否需要定义更多的__lt__? """ Represents a card using a suit and a rank
suits are Clubs, Diamonds, Hearts, Spades represented by 0, 1, 2,