Home > other >  With a list of the dictionary
With a list of the dictionary

Time:12-05

Dict1={" a ": 1," b ": 5," c ": 9}
F=[" a ", "b", "c"]
# # how to through the elements in the f value into the dictionary f=[1, 9]

CodePudding user response:

 print ([dict1 [_] for _ in f]) 
  • Related