I’m using a dictionary in python to make what is basically an infinite 2d array by using a tuple as the key
grid = {}
grid[(0,0)] = cell()
the value ‘cell’ is a new object. Can I have, say, a function within that object that is able to get its key value? ie. (0,0)
I could just put that data in the object itself but then I’d have it existing twice which seems like bad programming. Thanks!
then call it