0
열로에서 목록의 요소를 결합하는 방법 :이 같은 목록의 모든 두 요소를 결합 할 수 있어요
:colors=['green','yellow','red','green','yellow','red']
colors2=[x+y for x,y in zip(colors[0::2],colors[1::2])]
colors2
Out: ['greenyellow','redgreen','yellowed']
는 그러나, 나는이 목록의 모든 세 가지 요소를 결합 할 수 없습니다입니다
colors3=
[x+y+z for x,y,z in zip(colors[0::3],colors[1::4],colors[2::5])]
colors3
Out: ['greenyellowred']
다른 세 부분은 어디에서 정렬이 안되나요?