title: use == to check if two objects have the same value or not in python
body: <p>The following is the code:</p>
  
  <pre><code>class foo:
     def __init__(self,p1,p2):
         self.a1 = p1
         self.a2 = p2
  
  def main():
      o1=foo("lucy","jack")
      o2=foo('lucy','jack')
      print(o1==o2)
  main()
  </code></pre>
  
  <p>I understand that o1 and o2 are different objects. What confuses me is that, they have the same value, right? And the "==" is used to check to see if two objects have the same value or not, right? Did I miss something here?</p>