Apr-19-2024, 08:30 AM
to get the value of a dictionary entry use dictname['key']
like:
like:
>>> dict_1={'ali':12,"mohammad":15,"fatemeh":20} >>> x = dict_1['fatemeh'] >>> x 20or just:
>>> dict_1={'ali':12,"mohammad":15,"fatemeh":20} >>> print(dict_1['ali']) 12 >>>