import random
a=range(10) random.shuffle(a) print(a)
If you enter a code like, you will get the following error:
/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/bin/python3.6 /Users//PycharmProjects/demo4.py
Traceback (most recent call last):
File "/Users//PycharmProjects/demo4.py", line 6, in
Process finished with exit code 1
Random.randint (a, b) can generate random numbers normally, so I think there is no problem with importing random. Please help someone.
Recommended Posts