質問するログイン新規登録

回答編集履歴

2

d

2021/12/16 09:08

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
File without changes

1

d

2021/12/16 09:08

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -6,7 +6,7 @@
6
6
  dirpath = Path(".")
7
7
  for path in dirpath.glob("*"): # dirpath.iterdir() でも OK
8
8
  if not path.is_dir():
9
- continue
9
+ continue # ディレクトリでない場合は無視する
10
10
 
11
11
  print(path)
12
12
  ```