瀏覽代碼

Update random.md

blueloveTH 2 年之前
父節點
當前提交
b0f6b54600
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      docs/modules/random.md

+ 5 - 1
docs/modules/random.md

@@ -25,4 +25,8 @@ Return a random element from a sequence.
 
 ### `random.shuffle(seq)`
 
-Shuffle a sequence inplace.
+Shuffle a sequence inplace.
+
+### `random.choices(population, weights=None, k=1)`
+
+Return a k sized list of elements chosen from the population with replacement.