In Python, an empty class can be created by using the “pass” command. This can be done only after the defining of the class object because at least one line of code is mandatory for creating a class. Here’s an example of how to create an empty class:



class customer:

customer1 = customer()

customer1.first_name = 'Jason'
customer1.last_name = 'Doe'

Suggest An Answer

No suggestions Available!