I have many strings like this stored in list one
set bgp x vlan y tags-vlan bgp z,
set bgp x1 vlan y1 tags-vlan bgp z1,
.
.
.
.
and a second list contain values like this:
f,
j,
h,
m
from the first list of strings, i want to trim it and create from it a dict that contain values in this form:
bgp: x
vlan:y
tags-vlan bgp:z
-----
(to be added) details: p
and then add to the dict a fourth key called "details" which it's value is equal to the third value "h" in the second list, but add this key to the dict only when each time j == z, meaning second element of second list must equal third key value in newly made dict z and both have numeric value then add h to dict with the key name details.
the result is a dictionary like this, with h value being added with condition whenver z == j
bgp: x
vlan:y
tags-vlan bgp:z
details: h