- Help Center
- Python Programming
-
Data Science Bootcamp
-
Large Language Models Bootcamp
-
Agentic AI Bootcamp
-
Registration
-
Pricing
-
Community
-
Python Programming
-
Platform Related Issues
-
Bootcamps
-
Homework and Notebooks
-
Free Courses
-
Data Science for Business
-
Practicum
-
Blog
-
Employment Assistance
-
Machine Learning
-
Data Analysis
-
R Language
-
Python for Data Science
-
SQL
-
Introduction to Power BI
-
Power BI
-
Programming and Tools
-
Partnerships
How is an empty class created in python?
An empty class does not have any members defined in it. It is created by using the pass keyword (the pass command does nothing in python). We can create objects for this class outside the class.
For example-
class EmptyClassDemo:
pass
obj=EmptyClassDemo()
obj.name="Interviewbit"
print("Name created= ",obj.name)
Output:
Name created = Interviewbit