Lab 1 of 5
Β·
Guided
Inspect an IP Address String
Objective: Use string methods to examine an IP address at the interactive prompt.
Instructions
Open python3 in your terminal. Run each line below one at a time, pressing Enter after each:
ip = "192.168.10.1"
ip
ip.split(".")
len(ip.split("."))
ip.split(".")[0]
The first line stores the value and produces no output. The next four lines each produce a result.
Paste only the four output lines below (not the >>> prompts, not the assignment line) and submit.
π‘ Show Hint
The assignment line ip = "192.168.10.1" produces no output. Only the four lines after it produce results β paste those four.
Paste Your Output