What is the fastest or most efficient way of maintaining some sort of array for pixels on a screen in Python ? I don't want to use game libraries, just a simple array as I already have parts of it done without any libraries.
I'm developing a program which moving random stuff around the screen and i need to know whether a portion of the screen is already being used. what do you think ?
Should i be maintaining an entire array for the whole screen with 0s and 1s for on and off ?
or perhaps just a list of 'currently used pixels' ? 
or could i use sets for this ? as they don’t seem to store something twice.
not sure if you could somehow try and store a new pixel in it and use the failure as a result of that pixel is already used. 
or.. perhaps you have another idea that is better than what I've thought of so far.
Thanks!
Since you're going to be bouncing off these boundaries, use a range of values to indicate the angle of the surface rather than just 0 or 1. Keep the array the same way you're storing the image pixels.
Speedy lookups from some kind of table (for graphics collisions)