str.rfind(sub[, start[, end]])
path = "/home/test/test.py" filename = path[path.rfind("/")+1:] print(filename)
s = "hello, world!" pos = s.rfind("!") print(pos)
text = "Python is a great language. I love Python." pos = text.rfind("Python") print(pos)
标签: 缓存