WeCodeAcademy
❮ str.startswith()str.count() ❯

str.endswith()

Whether a string ends with text.

Group: String

Syntax

s.endswith(text)

Example

Examplepython
Open in editor »

← All of Python Reference