Python shuffle() with seed

1 개요[ | ]

Python shuffle with seed
import random
random.seed('2020-11-11')
fruits = ["Apple", "Banana", "Orange", "Mango"]
random.shuffle(fruits)
print( fruits )
# ['Mango', 'Orange', 'Apple', 'Banana']

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}