Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lists
#3
Hi Buran,

thanks for the prompt reply. I had tried something like that before. I would need to go through the config file and redact a lot of information, before I could post it.


If I print the len of config I can see 196

If I print config index 111 for example I can see an entry for 'GigabitEthernet'

However as you said when I iterate over config it returns a length of 0 and the list is empty.


196

(111, '\ninterface GigabitEthernet1/0/2\n description VM Trunk\n switchport trunk encapsulation dot1q\n switchport trunk allowed vlan 97,163\n switchport mode trunk\n switchport nonegotiate\n speed 1000\n duplex full\n no cdp enable\n')
0
[]
Reply


Messages In This Thread
Lists - by blake7 - Oct-06-2023, 11:22 AM
RE: Lists - by buran - Oct-06-2023, 11:37 AM
RE: Lists - by blake7 - Oct-06-2023, 11:54 AM
RE: Lists - by blake7 - Oct-06-2023, 12:08 PM
RE: Lists - by buran - Oct-06-2023, 12:09 PM
RE: Lists - by buran - Oct-06-2023, 12:29 PM
RE: Lists - by buran - Oct-06-2023, 12:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Split dict of lists into smaller dicts of lists. pcs3rd 3 3,293 Sep-19-2020, 09:12 AM
Last Post: ibreeden
  sort lists of lists with multiple criteria: similar values need to be treated equal stillsen 2 5,027 Mar-20-2019, 08:01 PM
Last Post: stillsen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020