More with for


#1

start_list = [5, 3, 1, 2, 4]
square_list = []
square_list.append"(number**2)
square_list.sort()
print square_list

Anyone have any insight as to why this doesn't work..


#2

@rblo10,
google search
== the Book ==
for in list site:python.org
https://wiki.python.org/moin/ForLoop

list append site:python.org
https://docs.python.org/2/tutorial/datastructures.html

PS.
If you present code in your POST, please use the </>-pre-code button....
Please re-edit your Post

  • leave one blank-line above of your code
  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.