Dear list readers,

the command find() takes two parameters, start and end, e.g.:

find(substring[, start[, end]]).

Here, a substring is located UP TO BUT NOT INCLUDING the optional
parameter 'end'.

Compare this to replace(). replace() comes with the count argument, e.g.:

replace(old, new[, count])

But here the substring is replaced UP TO AND INCLUDING to the optional
argument count.

My question is how I am best to make sense of this discrepancy. Is there
any logic behind this that might make my life easier once I become aware
of it? I know of the indexing rules, but this here is obviously not the
same. I am curious...

Thanks,

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

Reply via email to