ExamGecko
Question list
Search
Search

Related questions











Question 46 - 300-435 discussion

Report
Export

Refer to the exhibit.

A Python script has been created that calls the Cisco SD-WAN vManage Device Inventory API to get the list of vEdges. The JSON data that returns to a Python dictionary has been converted and assigned to a variable named “d”. A portion of the JSON is shown in the exhibit. Which code will complete the expression hostname= to access the hostname?

A.

d[“data”][0][“host-name”]

Answers
A.

d[“data”][0][“host-name”]

B.

d[data][0][host-name]

Answers
B.

d[data][0][host-name]

C.

d(“data”)[0](“host-name”)

Answers
C.

d(“data”)[0](“host-name”)

D.

d[“host-name”][“data”]{“0”}

Answers
D.

d[“host-name”][“data”]{“0”}

Suggested answer: A

Explanation:

:

The double-quotations are a necessary syntax of Python. And for the json portion doesnt use parentheses. It always uses brackets. d[“data”][0][“host-name”] is the only logical answer.

asked 07/10/2024
sarath raj
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first