In [7]:

endswith(suffix[, start[, end]])

2025-05-29 13:18

Checks if the string ends with the specified suffix.

### endswith(suffix[, start[, end]])

**Description:**
Returns True if the string ends with the specified suffix.

**Example:**
“`python
text = “example.txt”
print(text.endswith(“.txt”)) # Output: True
“`

**Use Case:**
Commonly used in file type checking or URL validation.