Python 파일명에서 확장자 제외

1 개요[ | ]

Python 파일명에서 확장자 제외
import os
print(os.path.splitext('hello.txt')[0])
import os
print(os.path.splitext('hello.txt.gz')[0])

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}