finedaypicnicの日記: リストの追加部分以外が本当に合っているかの確認方法
Python 3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = ["a", "b", "c"]
>>> b = ["a", "b", "c", "d"]
>>> l = len(a)
>>> l
3
>>> l = len(a[:-1])
>>> l
2
>>> c = a[:l]
>>> d = b[:l]
>>> print(c and d)
['a', 'b']
>>> print(c == d)
True
>>> e = "".join(a)