Aug-08-2021, 10:52 AM
Hi iam using random.choice and i want to ask you, how to know what element of array was choosen ?
example code
I need to store in variable what element from array was choosen. i mean number of element Is it possible ?
example code
I need to store in variable what element from array was choosen. i mean number of element Is it possible ?
import random array = ["Hello","Dog","Cat","Ball"] x = random.choice(array) print(x)