-1

Snippet 1:

class Room(Object):
      pass 

Snippet 2:

class Room():
      pass

What is the different between both of the code and why we write object in the above code?

Saharsh
  • 1,056
  • 10
  • 26

1 Answers1

2

Both are the same in Python3.

Read more about it in Python's documentation.

You might want to read this stack overflow question as well.

Search old style classes vs new style classes in Python.

Dipen Dadhaniya
  • 4,550
  • 2
  • 16
  • 24