Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

enum python string

from enum import Enum
 
class FRUITS(Enum):
     APPLE = 1
     ORANGE = 2
     GRAPES = 3
 
 
 
print ("The print enum memebr as string :
 ",end="")
print (FRUITS.APPLE)
print (FRUITS.ORANGE)
print (FRUITS.GRAPES)
 
print ("
 Print Name of enum member : 
",end ="")
print (FRUITS.APPLE)
print (FRUITS.ORANGE)
print (FRUITS.GRAPES)
Comment

PREVIOUS NEXT
Code Example
Python :: what is attribute in python 
Python :: Get the first 4 numbers of the innermost arrays using numpy 
Python :: how to change order of attributes of an element using beautiful soup 
Python :: drf not getting form 
Python :: pytorch get non diag element 
Python :: analog of join in pathlibn 
Python :: how to hide button in tkinter 
Python :: compilation terminated. In file included from plugins/python/pyloader.c:1:0: plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory #include <Python.h 
Python :: what is the best ide for python 
Python :: Python Tuples Tuples allow duplicate values 
Python :: telegram.ext package 
Python :: how to change padding of dbc.col 
Python :: read mouse log python 
Python :: guess number higher or lower in python 
Python :: find an element using id in requests-html library in python 
Python :: python aggregate count and sum 
Python :: python ip address increment 
Python :: python unittest setUpClass 
Python :: python email subject decode 
Python :: python remove vowels from string 
Python :: menu with icons tkinter 
Python :: python tkinter plot points 
Python :: python defualt error handler 
Python :: dataframe multiindex query 
Python :: Access python http.server on google colab 
Python :: object function in python 
Python :: how to add column to heroku postgres in my django app 
Python :: check even or odd in single line 
Python :: better way to see full csv in jupyter notebook 
Python :: discord.py add avatar to embed 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =