Posts: 4,647
Threads: 1,494
Joined: Sep 2016
reading up on
str.
endswith() i find the optional arguments
start and
end to be described vaguely. it does not say how they apply, like whether they affect both strings at the same time or just one of them. and if they apply to the string in argument 1, does the end of its substring always get checked as if it was located with
end at the end?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
that was one of the guesses i had. but the documentation does not give enough clue to pin that down or confirm it. is saving the creation of a string instance considered important in a system where performance considerations are generally limited (to use the correct algorithm)?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
Nov-22-2019, 08:52 PM
(This post was last modified: Nov-22-2019, 08:52 PM by Skaperen.)
(Nov-22-2019, 05:29 AM)LeanbridgeTech Wrote: The endswith() method returns True if a string ends with the given suffix otherwise returns False.
Syntax :
str.endswith(suffix, start, end)
even if
start and
end have random int values in those argument positions?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.