Latest web development tutorials

Pythonは演習32と、

Pythonの100リー Pythonの100リー

タイトル:リストの順序の出力値を反転させます。

プログラム解析:なし。

ソースコード:

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

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

上の例の出力は、次のとおりです。

three
two
one

Pythonの100リー Pythonの100リー