How to deal with Dictionary Basics in Python?

This recipe helps you deal with Dictionary Basics in Python
In [1]:
## How to deal with Dictionary Basics in Python
def Kickstarter_Example_56():
    print()
    print(format('How to work with Dictionary Basics in Python','*^82'))
    import warnings
    warnings.filterwarnings("ignore")
    # Build a dictionary via brackets
    unef_org = {'name' : 'UNEF',
                'staff' : 32,
                'url' : 'http://unef.org'}
    # View the variable
    print(); print(unef_org)
    #Build a dict via keys
    who_org = {}
    who_org['name'] = 'WHO'
    who_org['staff'] = '10'
    who_org['url'] = 'https://setscholars.com'
    # View the variable
    print(); print(who_org)
    # Build a dictionary via brackets # Nesting in dictionaries
    unitas_org = {'name' : 'UNITAS',
                  'staff' : 32,
                  'url' : ['https://setscholars.com',
                           'https://setscholars.info']}
    # View the variable
    print(); print(unitas_org)
    # Index the nested list
    print(); print(unitas_org['url'])
    print(); print(unitas_org['url'][0])
    print(); print(unitas_org['url'][1])
Kickstarter_Example_56()
*******************How to work with Dictionary Basics in Python*******************

{'name': 'UNEF', 'staff': 32, 'url': 'http://unef.org'}

{'name': 'WHO', 'staff': '10', 'url': 'https://setscholars.com'}

{'name': 'UNITAS', 'staff': 32, 'url': ['https://setscholars.com', 'https://setscholars.info']}

['https://setscholars.com', 'https://setscholars.info']

https://setscholars.com

https://setscholars.info