Uploaded October 2018 | Updated September 2026, 3 weeks ago
pythontutor.com/visualize.html is a great tool to see a visualization of short pieces of code do step by step. I show it off here with building a simple linked list using two classes.
link to final visualization: pythontutor.com/visualize.html#code=class%20Node%28object%29%3A%0A%20%20%20%20def%20__init__%28self,%20data,%20link%3DNone%29%3A%0A%20%20%20%20%20%20%20%20self.data%20%3D%20data%0A%20%20%20%20%20%20%20%20self.next%20%3D%20link%0A%0Aclass%20SingleLikedList%28object%29%3A%0A%0A%20%20%20%20def%20__init__%28self%29%3A%0A%20%20%20%20%20%20%20%20self.head%20%3D%20None%0A%0A%20%20%20%20def%20add%28self,%20data%29%3A%20%20%23%20add%20to%20front%0A%20%20%20%20%20%20%20%20node%20%3D%20Node%28data,%20self.head%29%0A%20%20%20%20%20%20%20%20self.head%20%3D%20node%0A%0Alinked_list%20%3D%20SingleLikedList%28%29%0Alinked_list.add%281%29%0Alinked_list.add%282%29%0Alinked_list.add%283%29%0Alinked_list.add%284%29%0A&cumulative=false&curInstr=42&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false
pythontutor.com/visualize.html is a great tool to see a visualization of short pieces of code do step by step. I show it off here with building a simple linked list using two classes.
link to final visualization: pythontutor.com/visualize.html#code=class%20Node%28object%29%3A%0A%20%20%20%20def%20__init__%28self,%20data,%20link%3DNone%29%3A%0A%20%20%20%20%20%20%20%20self.data%20%3D%20data%0A%20%20%20%20%20%20%20%20self.next%20%3D%20link%0A%0Aclass%20SingleLikedList%28object%29%3A%0A%0A%20%20%20%20def%20__init__%28self%29%3A%0A%20%20%20%20%20%20%20%20self.head%20%3D%20None%0A%0A%20%20%20%20def%20add%28self,%20data%29%3A%20%20%23%20add%20to%20front%0A%20%20%20%20%20%20%20%20node%20%3D%20Node%28data,%20self.head%29%0A%20%20%20%20%20%20%20%20self.head%20%3D%20node%0A%0Alinked_list%20%3D%20SingleLikedList%28%29%0Alinked_list.add%281%29%0Alinked_list.add%282%29%0Alinked_list.add%283%29%0Alinked_list.add%284%29%0A&cumulative=false&curInstr=42&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false










