Latest web development tutorials

Python include esercizi 32

Python 100 Li Python 100 Li

Titolo: invertire valore di uscita ordine della lista.

Analisi del programma: Nessuno.

Source Code:

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

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

L'output sopra esempio è:

three
two
one

Python 100 Li Python 100 Li