Python Find Last Index Of Substring Java