Bytecode

say it: “BYTE-kohd” /ˈbaɪtˌkoʊd/

The simpler instructions Python turns your code into before running it.

What is bytecode?

Bytecode is the simpler set of instructions Python turns your code into before running it. The .pyc files in __pycache__ are saved bytecode, so the next start is quicker.

import dis

def add_tax(price):
    return price * 1.07

dis.dis(add_tax)   # shows the instructions Python really runs

Level: Master · More Python terms at this level

Updated

In other subjects