본문 바로가기

Python

generate a sequence of random int in range

반응형
import random
nums = [x for x in range(10)]
random.shuffle(nums)
print(nums)


'Python' 카테고리의 다른 글

[Anaconda] Conda env clone  (0) 2019.08.30
numpy array with increasing integer element  (0) 2018.11.22
Random int generation in range  (0) 2018.10.30
How to fit a curve using scipy.optimize.curve  (0) 2018.10.29
Histogram function  (0) 2017.12.08