Answers for "What is the enumerate() function in Python?"

24

enumerate python

for index,subj in enumerate(subjects):
    print(index,subj) ## enumerate will fetch the index
    
0 Statistics
1 Artificial intelligence
2 Biology
3 Commerce
4 Science
5 Maths
Posted by: Guest on April-25-2020

Code answers related to "What is the enumerate() function in Python?"

Python Answers by Framework

Browse Popular Code Answers by Language