

Learn Python by visualizing code execution - rajeevk
http://pythontutor.com/visualize.html

======
japhyr
I love using this visualization tool with students who are new to programming.
You can create code snippets, and share them through a url.

Here is a quick example demonstrating why you need to use a slice to copy a
list:

[http://pythontutor.com/visualize.html#code=my_foods+%3D+%5B'...](http://pythontutor.com/visualize.html#code=my_foods+%3D+%5B'pizza',+'beer',+'steak+fries'%5D%0A%0A%23+Want+to+start+with+a+copy+of+my+list%3F%0A%23++Wrong+way%3A%0Ayour_foods+%3D+my_foods%0A%0A%23+Proof+that+it's+the+wrong+way%3A%0Ayour_foods.append\('ice+cream'\)%0A%0A%0Amy_foods.remove\('ice+cream'\)%0A%23+Proper+way+to+copy+my+list%3A%0Ayour_foods+%3D+my_foods%5B%3A%5D%0A%0A%23+Proof+that+we+have+separate+lists%3A%0Ayour_foods.append\('ice_cream'\)&mode=display&cumulative=false&heapPrimitives=false&drawParentPointers=false&textReferences=false&showOnlyOutputs=false&py=3&curInstr=0)

