1 Answer

0 votes
by
Empty class in Python is defined as a class that does not contain any code defined within the block. It can be created using pass keyword and object to this class can be created outside the class itself.

Example:

class x:

  pass

obj=x()

obj.id="123"

print("Id = ",obj.id)

Output:

123
Click here to read more about Python
Click here to read more about Insurance

Related questions

0 votes
asked May 23, 2020 in Python by sharadyadav1986
0 votes
asked Jun 23, 2019 in PHP by SakshiSharma
0 votes
asked May 16, 2020 in Python by Robindeniel
+1 vote
asked Feb 13 in Python by SakshiSharma
0 votes
asked Aug 30, 2020 in Python by sharadyadav1986
...