Classes in python


  def __init__(self,name):

    mobilephone.__init__(self,name)

def __str__(self):

  return self.name+" "+"Hi"

new_iphone=iPhone('iPhone 5s')

print(new_iphone)

I am not getting the string as output.
Instead what I am getting is <main.iPhone object at 0x7fdb043bb128

I’m not sure whether you’ve given proper indentation, can you share the screenshot of the cell?