for loop with enumerate python
presidents = ["Washington", "Adams", "Jefferson"]
for num, name in enumerate(presidents, start=0):
print("President {}: {}".format(num, name))
for loop with enumerate python
presidents = ["Washington", "Adams", "Jefferson"]
for num, name in enumerate(presidents, start=0):
print("President {}: {}".format(num, name))
how to loop through a python enum
from enum import Enum
class Country(Enum):
Afghanistan = 93
Albania = 355
Algeria = 213
Andorra = 376
Angola = 244
Antarctica = 672
for data in Country:
print('{:15} = {}'.format(data.name, data.value))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us