Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python - Syntax to call random function from a list

my_list = [func_test_1, func_test_2, func_test_3]
random.choice(my_list)()
Source by pythonhowto.org #
 
PREVIOUS NEXT
Tagged: #python #Syntax #call #random #function #list
ADD COMMENT
Topic
Name
2+4 =