翻看 random.shuffle 的原始碼,發現正是洗牌演算法。 def shuffle(self, x, random=None): if random is None: randbelow = self._randbelow
確定! 回上一頁