vault backup: 2023-04-27 14:02:42

This commit is contained in:
2023-04-27 14:02:42 +08:00
parent 45350787ba
commit dec47dbfe3
3 changed files with 24 additions and 41 deletions

View File

@@ -0,0 +1,5 @@
從list中選出n個項目有可能重複
```python
import random
random.choices(seq, n)
```

View File

@@ -0,0 +1,7 @@
從一個list中選出n個不重複的項目
```python
import random
random.sample(seq, n)
```
不像 [[choices()]] 是會重複的。