Answers for "list(my_enumerate(your_sequence)) == list(enumerate(your_sequence))"

0

list(my_enumerate(your_sequence)) == list(enumerate(your_sequence))

my_list = ['apple', 'banana', 'grapes', 'pear']
counter_list = list(enumerate(my_list, 1))
print(counter_list)
# Output: [(1, 'apple'), (2, 'banana'), (3, 'grapes'), (4, 'pear')]
Posted by: Guest on October-04-2020

Python Answers by Framework

Browse Popular Code Answers by Language