Menu
LogoLogoRight From BasicsInterview PrepCoding Questions
Articles
  • Hosting
  • Golang
  • Python
BlogBooks
SubscribeBuy me a Coffee!
🌜
🌞
LogoLogoRight From Basics
  • Interview Prep
  • Coding Questions
  • Articles
    • Hosting
    • Golang
    • Python
  • Blog
  • Books
  • Subscribe
  • Buy me a Coffee!
  • General Ideas & Concepts
    • Computing Terminologies
    • Programming Concepts
    • Types of Data Structures
  • Python Basics, Libraries & Concepts
    • Operators
    • Lists & Tuples
    • Dictionaries
    • Sets
    • Strings & Characters
    • Functions
    • Control Structures
    • Range Operator
    • Iterators & Generators
    • Priority Queues
    • Exception Handling
    • Object-Oriented Programming
    • Inheritance
    • References
    • Enums
    • Random Numbers
    • Input & Output
    • Miscellaneous Methods and Techniques
  • Sorting
    • Preliminaries
    • Bubble Sort
    • Selection Sort
    • Insertion Sort
    • Merge Sort
    • Quick Sort
  • Searching
    • Binary Search

Enums

Enums are created with the class syntax. Example:

from enum import Enum
class SuperHeroes(Enum):
BATMAN = 1
SUPERMAN = 2
WONDERWOMAN = 3
GREENLANTERN = 4
ANTMAN = 5
Previous
« References
Next
Random Numbers »

Links

  • Home
  • Medium Publication
  • Harish V
Copyright © 2021 Right From Basics. Built with Docusaurus.