Create dictionary of months by using keywords and shorthand that prints full month name

PHOTO EMBED

Mon Mar 30 2020 12:10:17 GMT+0000 (Coordinated Universal Time)

Saved by @bambifruit #python #python #dictionary #keys

month_conversion = {
“Jan” = “January”
“Feb” = “February”
“Mar” = “March”
“Apr” = “April”
“Jun” = “June”
}
# keys must be unique:
print(month_conversion[“Mar”])


Output”
           March
content_copyCOPY

keys like "Jan", "Feb" we can use anything as a key but must be unique we can't use the same key for two items. Curly braces are mostly used in dictionaries.

https://www.youtube.com/watch?v=rfscVS0vtbw&t=5s