Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python random dictionary

dict = { 'A' : 1, 'A' : 2, 'A' : 3}

random_element = random.choice(list(dict.items())
# Output = (key, value)
 
PREVIOUS NEXT
Tagged: #python #random #dictionary
ADD COMMENT
Topic
Name
7+8 =