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