Please refer to the exhibition.Which Python code snippet prints only descriptions of disabled interfaces?
Option A:
for interface in netconf_data ["GigabitEthernet"]:
print(interface["enabled"])
print(interface["description"])
Option B:
for interface in netconf_data ["GigabitEthernet"]:
if interface ["disabled"]!='true':
print(interface["description"])
Choice C:
for interface in netconf_data ["GigabitEthernet"]:
if interface ["enabled"]!='true':
print(interface["description")
Option D:
for interface in netconf_data ["GigabitEthernet"]:
if interface ["enabled"]!='false':
print(interface["description"])
I don't know which one is correct because the answer to this question varies from site to site.
Here is the reference site.
https://itexamanswers.net/ccie-ccnp-350-401-encor-dumps-full-questions-with-vce-pdf.html/2
This is the 379th question.
By the way, I chose the answer to D.
If you do not understand this problem, CCNP ENCOR will fail.
Please lend me your wisdom.
Thank you for your cooperation.
The correct answer should be C.For the if conditional clause to pick up only disabled items, see
interface ["enabled"]!='true'
In short, interface["enabled"]=='false'
, which means disabled✅
On the other hand, D is
interface ["enabled"]!='false'
In short, interface["enabled"]=='true'
, that is, enabled❌
For your information, A does not use if in the first place (❌) and B uses if block incorrectly (no indentation) (❌).
© 2024 OneMinuteCode. All rights reserved.