Answers for "What is the use of random.choice()"

8

random.choice

import random

numberList = [111,222,333,444,555]
print("random item from list is: ", random.choice(numberList))
Posted by: Guest on May-11-2020
0

random.choice

random.choice(sequence)
Posted by: Guest on May-11-2020

Code answers related to "What is the use of random.choice()"

Python Answers by Framework

Browse Popular Code Answers by Language