def create_digits(): """ Returns a string containing all digits. """ s = "" for i in range(10): s += str(i) return s # use the bytecode disassembler to display a vaguely-human- # readable form of the functions's bytecode: import dis dis.dis(create_digits)