Python code is compiled into Python bytecode, which is then executed on the Python virtual machine. Sometimes it is interesting to see what bytecode is produced from your Python code. Thankfully, Python ships with batteries included. So, it has a disassembler module built in that is called dis.
The dis method of the dis module can be easily used to disassemble a method in your Python code to its bytecode:
To see other methods of the dis module and information about the bytecode instructions, see dis in the Python documentation.
Tried with: Python 2.7.3 and Ubuntu 12.04 LTS