Q:

Write a Python program to get the unique enumeration values

0

Write a Python program to get the unique enumeration values.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import enum
class Countries(enum.Enum):
    Afghanistan = 93
    Albania = 355
    Algeria = 213
    Andorra = 376
    Angola = 244
    India = 355
    USA = 213
for result in Countries:
    print('{:15} = {}'.format(result.name, result.value))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now