Page not loading? Try clicking here.
Placeholder

#9534
Language restricted

리스트1 - 연습문제 6 1s - MB

Problems

아래와 같은 리스트를 만들고, 그 리스트의 다양한 부분 리스트를 출력하는 프로그램을 작성하라. 

['Carrot', 'Onion', 'Cabbage', 'Potato', 'Sweet Potato', 'Bean'] 


Example

 번째 원소: Carrot
마지막 원소: Bean
리스트 거꾸로 출력하기: ['Bean', 'Sweet Potato', 'Potato', 'Cabbage', 'Onion', 'Carrot']
li[2:5]: ['Cabbage', 'Potato', 'Sweet Potato']
li[5:2:-1]: ['Bean', 'Sweet Potato', 'Potato']
li[1:6:2]: ['Onion', 'Potato', 'Bean']

Source

자기주도 파이썬

You must sign in to write code.