Python Get index of Tuple with using endswith

125 views Asked by At

Is there a to give me the index of the tuple when I use endswith function.

eg:

lst = ('jpg','mp4','mp3')
b = "filemp4"

If I use b.endswith(lst), this give me True or false. but I need to find the index of 'lst' that match's the the string provided in 'b'

0

There are 0 answers