1

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'

Harsha Biyani
  • 7,049
  • 9
  • 37
  • 61
  • I don't see this in the docs. It could be an improvement, but it would break the current paradigmm since size index 0 would register as False. Maybe there could be a *endswithreturnindex* method (or something else). – Gi0rgi0s Jun 02 '19 at 15:33

0 Answers0