例:random.randint(1, 10) #由 1~10 產生一個整數,如:6 randrange(n1,n2,n3)從 n1 到(n2-1)之間每隔 n3 的數, ... 從 s 字串中隨機取得不重複的 n 個字元。
確定! 回上一頁