how to choose a random key and value from a dictionary in python code example Example: python dict get random key random.choice(list(my_dict))