문자열 메서드 : endswith, startswith
|예시
endswith
파일이름이 문자열로 저장되어 있을 때, 특정문자(예를들어 'xlsx' 또는 'xls')로 끝나는지 확인할 수 있는 메서드
file_name = "report.xlsx"
file_name.endswith(("xlsx", "xls"))
startswith
파일이름이 문자열로 저장되어 있을 때, 특정문자로 시작하는지 확인할 수 있는 메서드
file_name = "2021_report.xlsx"
file_name.startswith("2021")