Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use enums in Python classes?
There is a module name "enum" in python with the hep of which enum is used in python.
#import enum
import enum
# use enum in class
class Car(enum.Enum):
suzuki = 1
Hyundai = 2
Dezire = 3
print ("All the enum values are : ")
for c in (Car):
print(c)Advertisements