Let L be a list of items. Give Python code to reverse the
order of the items in L.
For example L = ['a', 4, 'u'] becomes ['u', 4, 'a'].
You may assume the list is not empty.
Do not make any other assumptions on the length of the list.
Answer:
n = len(L)
for i in range(0,n/2):
(L[i],L[n-i-1]) = (L[n-i-1],L[i])