'''
Reproduce the functionality of python's .enumerate()

Define a function my_enumerate() that takes an iterable as input
and yields the element and its index

'''


def my_enumerate(t):
    enum_list = list()
    for x in range(len(t)):
        tup = tuple()
        tup = x, t[x]
        enum_list.append(tup)
    return enum_list


my_list = ["cake", "wine", "school", "videochat", "birthday"]

print(my_enumerate(my_list))

for index, value in enumerate(my_list):
    print(index, value)

b762766fa5693b6be8ffd1b651020d26427aaca6
<mask token>

<mask token>


def my_enumerate(t):
    enum_list = list()
    for x in range(len(t)):
        tup = tuple()
        tup = x, t[x]
        enum_list.append(tup)
    return enum_list


<mask token>

<mask token>


def my_enumerate(t):
    enum_list = list()
    for x in range(len(t)):
        tup = tuple()
        tup = x, t[x]
        enum_list.append(tup)
    return enum_list


<mask token>
print(my_enumerate(my_list))
for index, value in enumerate(my_list):
    print(index, value)

<mask token>


def my_enumerate(t):
    enum_list = list()
    for x in range(len(t)):
        tup = tuple()
        tup = x, t[x]
        enum_list.append(tup)
    return enum_list


my_list = ['cake', 'wine', 'school', 'videochat', 'birthday']
print(my_enumerate(my_list))
for index, value in enumerate(my_list):
    print(index, value)

'''
Reproduce the functionality of python's .enumerate()

Define a function my_enumerate() that takes an iterable as input
and yields the element and its index

'''


def my_enumerate(t):
    enum_list = list()
    for x in range(len(t)):
        tup = tuple()
        tup = x, t[x]
        enum_list.append(tup)
    return enum_list


my_list = ["cake", "wine", "school", "videochat", "birthday"]

print(my_enumerate(my_list))

for index, value in enumerate(my_list):
    print(index, value)
