str.endswith(suffix[, start[, end]])
start 参数以 0 为第一个字符索引值。
end 参数以 1 为第一个字符索引值。
print('01234'.endswith('234', 0, 4))
>>> False
print('01234'.endswith('234', 0, 5))
>>> True
另外在count函数中也是一样
str.endswith(suffix[, start[, end]])
start 参数以 0 为第一个字符索引值。
end 参数以 1 为第一个字符索引值。
print('01234'.endswith('234', 0, 4))
>>> False
print('01234'.endswith('234', 0, 5))
>>> True
另外在count函数中也是一样