SyntaxFix
Write A Post
Hire A Developer
Questions
Try this (using random.choice from items)
import random a={ "str" : "sda" , "number" : 123, 55 : "num"} random.choice(list(a.items())) # ('str', 'sda') random.choice(list(a.items()))[1] # getting a value # 'num'