How to add key value to dictionary in Python

1 Answer

0 votes
dic = {}

dic["python"] = 3
dic["java"] = 6
dic["c++"] = 8

print(dic)
 

 
'''
run:
 
{'python': 3, 'java': 6, 'c++': 8}
 
'''

 



answered Oct 21, 2020 by avibootz

Related questions

...