Latest web development tutorials

파이썬은 운동 (32)

파이썬 100 리 파이썬 100 리

제목 :리스트의 순서 출력값을 반전.

프로그램 분석 : 없음.

소스 코드 :

#!/usr/bin/python
# -*- coding: UTF-8 -*-

a = ['one', 'two', 'three']
for i in a[::-1]:
	print i

위 예제의 출력은 다음과 같습니다

three
two
one

파이썬 100 리 파이썬 100 리