回答編集履歴
1
.
test
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
```python
|
2
2
|
def longest_string(moji_list):
|
3
|
+
first=moji_list[0]
|
3
4
|
```
|
4
5
|
エラーが起きているのは `moji_list` の要素数が0のときですが、`moji_list`の要素数が1のときにそれ以上再帰しないよう工夫するのがよいでしょう。
|
5
6
|
|