Dictionary help
Lets say that i've convert a dictionary into a list, now i want to convert it back to a dictionary and it still have the original values of the keys
Example:
import random dict = { "one": 1, "two": 2, } num = random.choice(list(dict)) print(dict.values()) # error that a list doesn't have a value
Voters
NahlaRuffin
i dont like youn
I don't know how this would actually be done with python keywords (I'd just created a nested array containing the key value pairs)
@Geocube101 Sorry for replying late, i was busy but anyways this worked, thank you!
@mkhoi You're welcome