# Online Python Tutor
**Source**: https://cscircles.cemc.uwaterloo.ca/visualize
**Parent**: https://cscircles.cemc.uwaterloo.ca/
[Computer Science Circles Homepage](https://cscircles.cemc.uwaterloo.ca/)
|
[Contact Us](https://cscircles.cemc.uwaterloo.ca/contact/)
Write your Python 3 code here:
\
Execute code using
Python 3.3
Python 2.7
,
hide frames of exited functions
show frames of exited functions
,
inline primitives and nested objects
render all objects on the heap
,
hide environment parent pointers
show environment parent pointers
,
draw references using arrows
use text labels for references
, and
show everything
show only outputs
.
Visualize Execution
Enter
optional text input for the program to read with input():
Examples
Basic Examples:\
[hello](#) |
[happy](#) |
[intro](#) |
[filter](#) |
[tokenize](#) |
[insertion sort](#) |
[list comprehension](#)
Math-Related Fun:\
[factorial](#) |
[fibonacci](#) |
[memoized fibonacci](#) |
[square root](#) |
[gcd](#) |
[towers of hanoi](#)
Higher-Order Functions:\
[closure 1](#) |
[closure 2](#) |
[closure 3](#) |
[closure 4](#) |
[closure 5](#)
\
[list map](#) |
[summation](#) |
[lambda param](#) |
[student torture](#)
User Input:\
[raw input](#)
Object-Oriented Programming:\
[OOP 1](#) |
[OOP 2](#) |
[OOP 3](#) |
[inheritance](#)
Linked Lists:\
[LL 1](#) |
[LL 2](#) |
[LL sum](#)
Pointer Aliasing:\
[aliasing 1](#) |
[aliasing 2](#) |
[aliasing 3](#) |
[aliasing 4](#)
\
[aliasing 5](#) |
[aliasing 6](#) |
[aliasing 7](#) |
[aliasing 8](#) |
[sumList](#)
More Python Tricks:\
[decorators](#) |
[generators](#) |
[gen expr](#) |
[varargs](#) |
[exceptions](#) |
[for-else](#) |
[nonlocal](#)
Generate URL
To share this visualization, click the 'Generate URL' button above
and share that URL. You can use it to share with others or
[report a bug](https://cscircles.cemc.uwaterloo.ca/contact/).
For more information about this tool (including Python 2 usage), visit [www.pythontutor.com](http://www.pythontutor.com/).
Original tool © 2010-2013 [Philip Guo](http://www.pgbovine.net/).
This version by [CS Circles](http://cscircles.cemc.uwaterloo.ca).