Created
November 27, 2020 13:28
-
-
Save kotoripiyopiyo/ba1cf2f847d24d4f0248c7494c1fb1e3 to your computer and use it in GitHub Desktop.
テキストファイルだけを抜き出してくるリスト内包表記
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
txtfile_list = [file_name for file_name in os.listdir() if re.search(r'.*.txt$', file_name)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
普通にforした場合