BGE Python: question regarding use of lists

–Sorry about how vague the question is, but I wasn’t sure what to name this. Anyway:
I’m using a series of objects set up around a map to act as “lights”, which all generate floats based off the distance from the player. What I want to do is add them all into a list, then combine these properties to form the “visibility” of the player (just a game float property). If an object is deleted, I’d like to remove said object from the list. NOW-- I have no idea what I’m doing, clearly. Any help on this would be much appreciated, just about on how to do any of it. Thanks.

Lists ,as far as i know cant have values,but dictionaries can, so rather use them : lightdict = {‘lamp1’:12,‘lamp2’:13}

Thank you, sir- shall do.

Be careful the distance changes between the frames. So there is no use in a list/dict/whatever as it invalidates latest when the player moves.

So you need to go to the current list of lights anyway retrieving the current distance.