reverse a list in python using for loop