Search Results

Search found 1 results on 1 pages for 'viddhart'.

Page 1/1 | 1 

  • How to access a function inside a function? Python

    - by viddhart
    I am wondering how I can access a function inside another function. I saw code like this: >>> def make_adder(x): def adder(y): return x+y return adder >>> a = make_adder(5) >>> a(10) 15 So, is there another way to call the adder function? And my second question is why in the last line I call adder not adder(...)? Good explanations are much appreciated.

    Read the article

1