On 23/05/2018 22:51, [email protected] wrote:
s = "kitti"0,1,2,3,4 k,i,t,t,i how do i retrieve '4'. i know i can do a len(s)-1, but i assume there is a function that gives me last number of index
Not for that trivial task. But you can create your own:
def upb(x): return len(x)-1 # 'upb' means 'upper-bound'
print (upb("kitti")) # output: 4
--
https://mail.python.org/mailman/listinfo/python-list
