回答編集履歴
1
追記
test
CHANGED
@@ -9,3 +9,17 @@
|
|
9
9
|
print(A) # [1, 0, False, 3]
|
10
10
|
|
11
11
|
```
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
filterを使いたいならこんな感じになります。煩雑ですね。
|
16
|
+
|
17
|
+
```Python
|
18
|
+
|
19
|
+
A = [1, None, 0, False, 3]
|
20
|
+
|
21
|
+
A = list(filter(lambda x: x is not None, A))
|
22
|
+
|
23
|
+
print(A) # [1, 0, False, 3]
|
24
|
+
|
25
|
+
```
|