rfind method

text = '123 456 56 78'
idx = text.rfind('56')

print(idx)  # 8

Leave a Comment

Your email address will not be published. Required fields are marked *