Logo

Programming-Idioms

History of Idiom 97 > diff from v7 to v8

Edit summary for version 8 by :

Version 7

2015-10-29, 14:05:17

Version 8

2015-10-31, 15:37:21

Idiom #97 Check string suffix

Set boolean b to true if string s ends with suffix suffix, false otherwise.

Idiom #97 Check string suffix

Set boolean b to true if string s ends with suffix suffix, false otherwise.

Code
b = s.endswith(suffix)
Doc URL
https://docs.python.org/3/library/stdtypes.html#str.endswith