Q. Which method checks if a string ends with a suffix?
Solution:
endswith() checks if a string ends with a specified suffix, e.g., ‘file.txt’.endswith(‘.txt’) is True.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.