title: Explain python Singleton class
body: <pre><code>class Singleton:
  
      instance = None
  
      def __new__(cls):
          if cls.instance is None:
              cls.instance = super().__new__(cls)
          return cls.instance
  
  singleton_obj1 = Singleton()
  singleton_obj2 = Singleton()
  
  print(singleton_obj1)
  print(singleton_obj2)
  </code></pre>
  
  <p><strong>output</strong></p>
  
  <pre><code>&lt;__main__.Singleton object at 0x10dbc0f60&gt;
  &lt;__main__.Singleton object at 0x10dbc0f60&gt;
  </code></pre>
  
  <p>Can someone explain what exactly happening at this line <code>cls.instance = super().__new__(cls)</code>. Which lines of code helped to make this class <code>Singleton</code>?</p>