回答編集履歴

1

Update

2022/09/07 05:34

投稿

melian
melian

スコア19840

test CHANGED
@@ -2,7 +2,7 @@
2
2
  Animal = []
3
3
  for i in range(7):
4
4
  lst = globals().get(f'list_{i}', None)
5
- if lst is not None and isinstance(lst, list) and len(lst):
5
+ if lst is not None and isinstance(lst, list) and lst:
6
6
  Animal.append(lst[0])
7
7
 
8
8
  print(Animal)