add router and interface name matches from regex to dict with no duplicates

Advertisements I have a RegEx that extracts Juniper router and interface names from RANCID configs. I want to properly utilize a dict, set or list (doesn’t honestly matter, I display a dict in my example) that will store the router names from my example text (the dict key) without duplicates (ONE router name per device).… Read More add router and interface name matches from regex to dict with no duplicates