The ____ method in Python string objects is used to check if the string ends with a specified suffix.

  • contains()
  • endswith()
  • find()
  • startswith()

The endswith() method in Python string objects is used to check if the string ends with a specified suffix. It returns True if the string ends with the specified suffix; otherwise, it returns False.

Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *