Lab 1 of 5
Β·
Guided
Test Network Strings at the Interactive Prompt
Objective: Use Python interactive mode to inspect a hostname string.
Instructions
Open your terminal and type python3 to enter interactive mode. You will see >>>.
Run each of these lines one at a time, pressing Enter after each one:
hostname = "sw-core-01"
hostname
len(hostname)
type(hostname)
The first line stores the value β it produces no output. The next three lines each print a result.
Paste only the three lines of output below (not the >>> prompts, not the assignment line) and submit.
π‘ Show Hint
The assignment line (hostname = "sw-core-01") produces no output. Only the next three lines produce output β paste those three results.
Paste Your Output