More With For


#1

# More with for
start_list = [5, 3, 1, 2, 4]
square_list = []

for x in start_list:
    square_list.append(x ** 2)

for x in square_list:
    square_list.sort()
    print x

# And Voila

#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.