Aug-08-2021, 10:52 AM
(This post was last modified: Aug-08-2021, 10:52 AM by samuelbachorik.)
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)
My github:
https://github.com/Samuel-Bachorik
https://github.com/Samuel-Bachorik