"Rafael Durán Castañeda" <rafadurancastan...@gmail.com> wrote

I don't see discrepancy, end and count are two arguments than mean very different things. End is the position where find ends, it could be included or excluded, in this case is excluded. Count is the maximun number of substrings you want to replace, it wouldn't make sense count=6 if you want
to replace 5.

And in general Python uses the convention for *positional* values
that it goes up to but not including the last position.

Compare slicing, range() etc.

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to