Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pick random value from dictionary

country, capital = random.choice(list(d.items()))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pick #random #dictionary
ADD COMMENT
Topic
Name
2+4 =