How2pass.com Forums
QID:EC1223 - Printable Version

+- How2pass.com Forums (https://www.how2pass.com/forum)
+-- Forum: CCNP (https://www.how2pass.com/forum/forum-6.html)
+--- Forum: CCNP ENCOR 350-401 Forum (https://www.how2pass.com/forum/forum-19.html)
+--- Thread: QID:EC1223 (/thread-2483.html)



QID:EC1223 - chewosaurus - 06-13-2025

Hello me again Big Grin 

The green answer is wrong because the actual code does:
u2.append(u101)

Which appends the entire list of fields [Device-ID, Local-Intf, Hold-time, Capability, Port-ID]
for each LLDP neighbor—not just the first element (hostname).

To make the script produce only the hostname I believe you would change that line to:
u2.append(u101[0])

u101[0] is the first element of that list—the Device ID or hostname.


I'm still quite new to this subject so if I'm wrong, forgive me but I think the logic I mentioned has some truth to it.

Thanks


RE: QID:EC1223 - help_desk - 06-14-2025

Your logic has a lot of truth to it, and we have updated the question. We appreciate your feedback very much for bringing these issues to our attention. Thank you!