⚑ IT Wisdom There are 10 kinds of people in the world: those who understand binary and those who have never been to a DevOps standup.
Skilled Practitioner
4249 XP 1751 to Expert
Objective: Import device_utils and use both functions to process a list of raw hostnames.
Instructions

Using the device_utils.py module you created in Lab 2, create a file called lab3.py that:

  1. Imports device_utils
  2. Loops through this list of raw hostnames: python raw = [" SW-CORE-01 ", "rtr-edge-01", "fw-dmz-01", " SW-ACCESS-01 "]
  3. For each hostname: formats it using format_hostname, gets the type using get_device_type, then prints: <formatted_name> β†’ <type>

Run python3 lab3.py. Paste your output below and submit.

πŸ’‘ Show Hint
Call format_hostname first to clean the name, then pass the cleaned name to get_device_type. Chain the results into the print statement.
Paste Your Output
Next Lab β†’