Python Exercise Example 32
**Question:** Output the values of a list in reverse order.
**Analysis:** None.
Program source code:
Example
#!/usr/bin/python
-- coding: UTF-8 --
a
=
[
'
one
'
,
'
two
'
,
'
three
'
]
for
i
in
a
[
::-
1
]
:
(
i
)
The output of the above example is:
three
two
one
Python 100 Examples