Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

print index of tuple python

Input:
val = ('a','b','c','d','e','f','g','h','i','j','k','l',
'm','n','o','p','q','r','s','t','u','v','w','x','y','z')  
print(val)
index = val.index('m')
print("Index of m is: ",index)

Output:
('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z')
Index of m is:  12
 
PREVIOUS NEXT
Tagged: #print #index #tuple #python
ADD COMMENT
Topic
Name
9+2 =