Why does Python return -1 for string.rfind(last character of string, 0, len(string) – 1)?
For Python str.rfind(sub[, start[, end]]) method, I think these are the default values for the start and end parameters: start = 0 end = the index of the last character of the string, which is equivalent to the length of the string minus 1. However, Python returns different results for lines 3 and 4 below.… Read More Why does Python return -1 for string.rfind(last character of string, 0, len(string) – 1)?