What is the most effecient way to keep track of collisions 
<p>I am a new young programmer and I am learning python. I am just making a sample program to learn how to make bigger programs.</p>

<pre><code>class Robot():

    def __init__(self):
        self.xpos = 0
        self.ypos = 0

    def step(self, axis):
        print "step"
        if axis in "xX":
            self.xpos += 1
        elif axis in "yY":
            self.ypos += 1

    def walk(self, axis, steps=2):
        for i in range(steps):
            self.step(axis)

    def get_pos(self):
        print "X:%i  Y:%i" % (self.xpos, self.ypos)


robot = Robot()
robot.walk("x", steps=3)
</code></pre>

<p>All this does is keep track of where an individual robot is. How can i keep track if i have two robots and if they are in the same location.</p>

<p>Example:</p>

<pre><code>robot1 = Robot()
robot2 = Robot()
robot1.walk("x",5)
robot2.walk("x",5)
</code></pre>

<p>they would be in the same location so how would i check to see if any robots are in the same location?</p>
