回答編集履歴
1
追加説明
answer
CHANGED
|
@@ -7,4 +7,16 @@
|
|
|
7
7
|
1557373418496
|
|
8
8
|
>>> fruits is fruits[:]
|
|
9
9
|
False
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
従って、以下のコードを実行しているのと同じです。
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
fruits = ["apple","kiwi","plum"]
|
|
16
|
+
fruits_copy = fruits[:]
|
|
17
|
+
for f in fruits_copy:
|
|
18
|
+
if len(f) < 5:
|
|
19
|
+
fruits.insert(0,f)
|
|
20
|
+
fruits.pop()
|
|
21
|
+
print(fruits,end="")
|
|
10
22
|
```
|