Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pick random entry in dict python

from random import choice

dictionary[choice(list(dictionary.keys()))] # where "dictionary" is the label of, guess what, the variable holding a dictionary you want a random item from.
 
PREVIOUS NEXT
Tagged: #pick #random #entry #dict #python
ADD COMMENT
Topic
Name
8+5 =