0

How do you print a bunch of numbers in random order in python?

like this: 4 20 81 1 24 75 34 54 2

5th Dec 2019, 7:48 PM
Esteban Rueda
Esteban Rueda - avatar
2 Answers
+ 2
import random print(*list(random.randint(0, 100) for x in range(10)), sep="\n")
5th Dec 2019, 8:30 PM
rodwynnejones
rodwynnejones - avatar