⚑ IT Wisdom Python 2 is dead. Stop trying to resuscitate it. Let it go. It's gone.
Skilled Practitioner
4249 XP 1751 to Expert
Objective: Create a dictionary representing a network device and access its values.
Instructions

Open python3 in your terminal. Run each line below one at a time:

device = {"name": "sw-core-01", "ip": "10.1.1.1", "type": "switch", "site": "HQ", "vlan": 10}
device["name"]
device["ip"]
device.keys()
len(device)

The first line creates the dictionary and produces no output. The next four lines each produce a result.

Paste only the four output lines below and submit.

πŸ’‘ Show Hint
The assignment line produces no output. device["name"] returns the value for that key. dict.keys() returns all keys. len() counts the number of key-value pairs.
Paste Your Output
Next Lab β†’