List | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

List

list = ["1", "2", "3", "4"] a = how to make the value of (a) a random object from (list)

7th May 2020, 11:26 AM
_nrkvv_
_nrkvv_ - avatar
1 Answer
+ 6
Import random a=random.choice(list)
7th May 2020, 11:31 AM
Abhay
Abhay - avatar