exam questions

Exam 300-435 All Questions

View all questions & answers for the 300-435 exam

Exam 300-435 topic 1 question 82 discussion

Actual exam question from Cisco's 300-435
Question #: 82
Topic #: 1
[All 300-435 Questions]


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ג€]
  • B. d[data][0][host-name]
  • C. d(ג€dataג€)[0](ג€host-nameג€)
  • D. d[ג€host-nameג€][ג€dataג€]{ג€0ג€}
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
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.

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
genkiro2020
Highly Voted 1 year, 10 months ago
d["dataג"][0]["host-name"]
upvoted 8 times
...
Alondrix
Most Recent 9 months, 4 weeks ago
Page adds odd characters, to be clear it should be d["data"][0]["host-name"]
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...