nested list in python using for loop