import dis
def simply(a):
print(a)
def fib(n):
if n < 2:
return n
current, next = 0,1
while n:
current, next = next, current+ next
n -= 1
return current
dis.code_info(fib)
dis.dis(fib) #display the bytecode
print(fib.__code__) #display the bytecode
print(fib.__code__.co_consts) # const within the code (none is function return value)
print(fib.__code__.co_name) #variable names
print(fib.__code__.co_code) #machine byte code
print(dis.opname[124]) #show the 124 byte code 's opname