searching in a tuple python

Solutions on MaxInterview for searching in a tuple python by the best coders in the world

showing results for - "searching in a tuple python"
María Alejandra
14 Apr 2018
1# vowels tuple
2vowels = ('a', 'e', 'i', 'o', 'i', 'u')
3
4# element 'e' is searched
5index = vowels.index('e')
6
7# index is printed
8print('The index of e:', index)
9
10# element 'i' is searched
11index = vowels.index('i')
12
13# only the first index of the element is printed
14print('The index of i:', index)