Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pick random value from dictionary python

import random
d = {'VENEZUELA':'CARACAS', 'CANADA':'OTTAWA'}
random.choice(list(d.values()))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pick #random #dictionary #python
ADD COMMENT
Topic
Name
1+4 =