Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

enumurate in python

#python
# Python program to illustrate
# enumerate function
l1 = ["eat","sleep","repeat"]
s1 = "hello"

# creating enumerate objects
obj1 = enumerate(l1)
obj2 = enumerate(s1)

print ("Return type:",type(obj1))
print (list(enumerate(l1)))

# changing start index to 2 from 0
print (list(enumerate(s1,2)))
 
PREVIOUS NEXT
Tagged: #enumurate #python
ADD COMMENT
Topic
Name
3+1 =