for loop in python

g.v.aarthi at skct.edu.in g.v.aarthi at skct.edu.in
Thu Apr 28 05:34:13 EDT 2016


start_list = [5, 3, 1, 2, 4]
square_list = []

# Your code here!
for square_list in start_list:
   x = pow(start_list, 2)
   square_list.append(x)
   square_list.sort()
print square_list

TypeError: unsupported operand type(s) for ** or pow(): 'list' and 'int'
Please provide me the solution for the above problem



More information about the Python-list mailing list