Demo entry 6636356

dadad

   

Submitted by anonymous on Aug 23, 2017 at 19:17
Language: Python. Code size: 501 Bytes.

In [1]: def add(x,y):
   ...:     return x+y
   ...: 

In [2]: k = lambda x,y : x+y

In [3]: import dis

In [4]: dis.dis(add)
  2           0 LOAD_FAST                0 (x)
              3 LOAD_FAST                1 (y)
              6 BINARY_ADD          
              7 RETURN_VALUE        

In [5]: dis.dis(k)
  1           0 LOAD_FAST                0 (x)
              3 LOAD_FAST                1 (y)
              6 BINARY_ADD          
              7 RETURN_VALUE        

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).