-
>>> import random ['BPF', 'LOG4', 'NV_MAGICCONST', 'RECIP_BPF', 'Random', 'SG_MAGICCONST', 'System Random', 'TWOPI', '_Sequence', '_Set', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_ac cumulate', '_acos', '_bisect', '_ceil', '_cos', '_e', '_exp', '_inst', '_log', ' _os', '_pi', '_random', '_repeat', '_sha512', '_sin', '_sqrt', '_test', '_test_g enerator', '_urandom', '_warn', 'betavariate', 'choice', 'choices', 'expovariate ', 'gammavariate', 'gauss', 'getrandbits', 'getstate', 'lognormvariate', 'normal variate', 'paretovariate', 'randint', 'random', 'randrange', 'sample', 'seed', ' setstate', 'shuffle', 'triangular', 'uniform', 'vonmisesvariate', 'weibullvariat e']
범위지정 방식
>>> random.randrange(1,20) 1 >>> random.randrange(1,20) 2 >>> random.randrange(1,20) 15
'Python' 카테고리의 다른 글
Python Sandbox (0) 2021.06.23 Opencv 윤곽 검출 (0) 2021.04.12 Opencv boundingRect (0) 2021.04.12 Python ScikitLearn 손글씨 숫자 인식 2 (0) 2021.04.12 Python ScikitLearn 손글씨 숫자 인식 1 (0) 2021.04.12 Python numpy.reshape (0) 2021.04.12 ScikitLearn 내장 손글씨 숫자 (0) 2021.04.12 OpenCv haarcascades 얼굴인식 (0) 2021.04.12