回答編集履歴

2

2022/12/03 11:14

投稿

melian
melian

スコア19761

test CHANGED
@@ -5,7 +5,7 @@
5
5
  lst2 = ['d', 'e', 'f']
6
6
  lst3 = ['g', 'h', 'i']
7
7
 
8
- lst = [lst2, lst1, lst3]
8
+ lst = [lst1, lst2, lst3]
9
9
  random.shuffle(lst)
10
10
  [random.shuffle(i) for i in lst]
11
11
  lst = sum(lst, [])

1

2022/12/03 11:11

投稿

melian
melian

スコア19761

test CHANGED
@@ -6,10 +6,11 @@
6
6
  lst3 = ['g', 'h', 'i']
7
7
 
8
8
  lst = [lst2, lst1, lst3]
9
+ random.shuffle(lst)
9
10
  [random.shuffle(i) for i in lst]
10
11
  lst = sum(lst, [])
11
12
  print(lst)
12
13
 
13
14
  #
14
- # ['e', 'd', 'f', 'c', 'a', 'b', 'h', 'g', 'i']
15
+ # ['i', 'h', 'g', 'f', 'e', 'd', 'c', 'a', 'b']
15
16
  ```