I'm looking for a way to maintain and update a list of IP addresses that I can index into (via a pair of IP addresses) to add a new address to the list.
For example, suppose I have an arbitrary index of (10.0.0.1 & 11.0.0.1). For that pair of indexes, I want a list of other IP addresses. I need to be able to add to the list for the pair 10.0.0.1 & 11.0.0.1 and also use something like the "in" operator to see if the addr I want to add is already present.
Something like this (the indexes are on the left and each index is a list)
(10.0.0.1, 11.0.0.1) --> [1.1.1.1, 6.7.8.9, 120.2.10.7, ...]
(17.7.1.3, 119.4.3.1) --> [33.5.1.81, 14.76.1.28, 14.9.65.19, ...] . . .
I don't really want to bother creating a database at the moment, I just want a quick temporary solution. Some time later, I'll store the info into a database.
Wondering if there are any ideas of collections that I can try.
(See the solution that I posted below, thx to the answers.)