ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 346 - 350-601 discussion

Report
Export

An engineer implements a Python script inside a Cisco Bash shell The script contains this dictionary object

Which command must be used to add the 'NSK-Spine-2': '1498323434' element to the switch_id list dictionary?

A.

Option A

Answers
A.

Option A

B.

Option B

Answers
B.

Option B

C.

Option C

Answers
C.

Option C

D.

Option D

Answers
D.

Option D

Suggested answer: B

Explanation:

Theupdate()method in Python is used to add an element to a dictionary. It takes either another dictionary object or an iterable of key-value pairs and adds them to the dictionary. If the key is already present in the dictionary,update()will update the key with the new value. Option B correctly uses theupdate()method to add the new 'N9K-Spine-2': '1498323434' key-value pair to theswitch_id_listdictionary.

asked 10/10/2024
Kefash White
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first