0
Как вывести значение input(), с помощью ключа списка?
#числа месяца mes = { ("1"): "tsuitachi", ("2"): "futsuka", ("3"): "mikka", ("4"): "yokka", ("5"): "itsuka", ("6"): "muika", ("7"): "nanoka", ("8"): "youka", ("9"): "kokonoka", ("10"): "tooka", ("11"): "jiyuuyokka", ("12"): "jiyuushichinichi", ("13"): "jiyuukunichi", ("14"): "hatsuka", ("15"): "nijiyuuyokka", ("16"): "nijiyuushichinichi", ("17"): "nijiyuukunichi" }
1 Respuesta
+ 3
If you want value of a certain key in a dictionary then just use this syntax...
print(dictionary[key])
1) Instead of dictionary, type 'mes'(dictionary).
2) Instead of key, give the input value. You can save the input value in a variable and then pass it as key!
I hope you understand.
Извините, я не могу объяснить по-русски.