How to get index of element in tuple with Python

1 Answer

0 votes
t = ('java', 'python', 'c', 'php', 'c++')

index = t.index("python")

print(index)
print(t[index])


'''
run:

1
python

'''

 



answered Oct 31, 2018 by avibootz

Related questions

...