how to create dictory in python with given data code example
Example 1: what is a dictionary in programming
// This is a JS Object (dictionary eqiv.)
var obj = {
num:16,
str:'hello',
bool:true
};
Example 2: how to create dictionary in python
d = {'key': 'value'}
print(d)
# {'key': 'value'}
d['mynewkey'] = 'mynewvalue'
print(d)
# {'key': 'value', 'mynewkey': 'mynewvalue'}