标签:
list:
start_list = [5, 3, 1, 2, 4] square_list = [] for num in start_list: square_list.append(num*num) # append to tail square_list.sort() # alphabetic order print square_list
Python基本语法
原文地址:http://www.cnblogs.com/ruanchao/p/4866294.html