python - Is there any way to retrieve data from dictionary with a tuple? -
Say that there is a dictionary and a tupal, I use the toplal as the key to get the value from the dictionary To do and then to put in, the result is in another tube.
and what else do I want Tupal: More specific, what I try to implement is to get the You can do this: dic = {"b": "bad", "a": "alpha", "c": for example, the dictionary and tubal are below < Change "}
tup = (" a "," b "," c ") ,
("alpha", "bad", "change") , is there any way to do this?
dic.values () result, which results in me wanting to be
Know about the collection. Order () function, but the function is not available in my situation.
result = [dc [ i] T for i) print tuple (result) ("alpha", "bad", "change")
Comments
Post a Comment