(Feb-24-2019, 08:43 AM)buran Wrote: what's the output from
print ("\nRTR List: ",rtrlist) print ("\nINT List: ",ilist) print ("\nDESC List: ",dlist) print ("\nBUN List: ",blist)and there is no need of line 69updatecsv.close()
- you are using with context manager so it will take care to close the file
@buran Noted, I have removed the close csv.
Heres the print output, Though I have sanitized the desc list since it contains sensitive information. But its similar to the 1st above output.
RTR List: ['r01.tp06', 'r02.m01', 'r01.m02'] INT List: [['HundredGigE0/2/0/0', 'HundredGigE0/2/0/0.242', 'HundredGigE0/2/0/0.244 l2transport', 'HundredGigE0/2/0/1', 'HundredGigE0/2/0/0.244'], ['TenGigabitEthernet1/1/0.138'], ['TenGigE0/1/0/15']] DESC List: [['ALPHANUMERICWITHCHARAC;;;', 'ALPHANUMERICWITHCHARAC;;;', 'ALPHANUMERICWITHCHARAC;;;'], ['ALPHANUMERICWITHCHARAC;;;'], ['ALPHANUMERICWITHCHARAC;;;']] BUN List: ['', '', '']