Lets say I have the following variables
data
which contains the following [('TenGigabitEthernet1/0/1',), ('TenGigabitEthernet1/0/2',),('TenGigabitEthernet1/0/3',),('TenGigabitEthernet1/0/4',),('TenGigabitEthernet1/0/5',)]
input
that contains ['TenGigabitEthernet1/0/1', 'TenGigabitEthernet1/2/2']
.
How do i compare the two variable and remove the duplicate TenGigabitEthernet1/0/1
from input and append TenGigabitEthernet1/2/2
to the variable data
from input
I tried the following but it cannot work. Got the following error 'list' object is not callable
for i in data:
for a in input
if input(a) == data(i):
input.remove(a)
How do i correct this to make it work? I think my logic is correct but just dont know how to code it