回答編集履歴

1

追記

2021/02/01 02:20

投稿

jeanbiego
jeanbiego

スコア3966

test CHANGED
@@ -1,3 +1,145 @@
1
- `report_multi_array = [r.split(",") for r in report.split("\n")]`
1
+ 一気にというのは、たとえば下記のように内包表記を使ってということでしょうか
2
2
 
3
+
4
+
5
+ ```python3
6
+
7
+ report_multi_array = [r.split(",") for r in report.split("\n")]
8
+
9
+
10
+
11
+ # [['user',
12
+
13
+ # 'arn',
14
+
15
+ # 'user_creation_time',
16
+
17
+ # 'password_enabled',
18
+
19
+ # 'password_last_used',
20
+
21
+ # 'password_last_changed',
22
+
23
+ # 'password_next_rotation',
24
+
25
+ # 'mfa_active',
26
+
27
+ # 'access_key_1_active',
28
+
29
+ # 'access_key_1_last_rotated',
30
+
31
+ # 'access_key_1_last_used_date',
32
+
33
+ # 'access_key_1_last_used_region',
34
+
3
- 一気にというのは、たとえば上のように内包表記を使ってということでしょうか(動作確認はしてません)
35
+ # 'access_key_1_last_used_service',
36
+
37
+ # 'access_key_2_active',
38
+
39
+ # 'access_key_2_last_rotated',
40
+
41
+ # 'access_key_2_last_used_date',
42
+
43
+ # 'access_key_2_last_used_region',
44
+
45
+ # 'access_key_2_last_used_service',
46
+
47
+ # 'cert_1_active',
48
+
49
+ # 'cert_1_last_rotated',
50
+
51
+ # 'cert_2_active',
52
+
53
+ # 'cert_2_last_rotated'],
54
+
55
+ # ['<root_account>',
56
+
57
+ # 'arn:aws:iam::012345678910:root',
58
+
59
+ # '202x-0x-xxT0x:0x:0x+00:00',
60
+
61
+ # 'not_supported',
62
+
63
+ # '202x-0x-xxT0x:0x:0x+00:00',
64
+
65
+ # 'hogehoge',
66
+
67
+ # 'hogehoge',
68
+
69
+ # 'hoge',
70
+
71
+ # 'hoge',
72
+
73
+ # 'N/A',
74
+
75
+ # 'N/A',
76
+
77
+ # 'N/A',
78
+
79
+ # 'N/A',
80
+
81
+ # 'hoge',
82
+
83
+ # 'N/A',
84
+
85
+ # 'N/A',
86
+
87
+ # 'N/A',
88
+
89
+ # 'N/A',
90
+
91
+ # 'hoge',
92
+
93
+ # 'N/A',
94
+
95
+ # 'hoge',
96
+
97
+ # 'N/A'],
98
+
99
+ # ['hogeuser',
100
+
101
+ # 'arn:aws:iam::012345678910:user/hogeuser',
102
+
103
+ # '202x-0x-0xT0x:0x:0x+00:00',
104
+
105
+ # 'hoge',
106
+
107
+ # 'hogehoge',
108
+
109
+ # '202x-0x-0xT0x:0x:0x+00:00',
110
+
111
+ # 'N/A',
112
+
113
+ # 'hoge',
114
+
115
+ # 'hoge',
116
+
117
+ # '202x-0x-0xT0x:0x:0x+00:00',
118
+
119
+ # '2021-0x-0xT0x:0x:00+00:00',
120
+
121
+ # 'ap-northeast-1',
122
+
123
+ # 'hoge',
124
+
125
+ # 'hoge',
126
+
127
+ # 'N/A',
128
+
129
+ # 'N/A',
130
+
131
+ # 'N/A',
132
+
133
+ # 'N/A',
134
+
135
+ # 'hoge',
136
+
137
+ # 'N/A',
138
+
139
+ # 'hoge',
140
+
141
+ # 'N/A'],
142
+
143
+ # ['']]
144
+
145
+ ```