当我使用 endswith 函数时,是否有一个给我元组的索引 .
endswith
例如:
lst = ('jpg','mp4','mp3') b = "filemp4"
如果我使用 b.endswith(lst) ,这会给我 True 或 false . 但我需要找到' lst ' that match'的索引'' b '中提供的字符串
b.endswith(lst)
True
false
lst
b