About 683,000 results
Open links in new tab
  1. How do nested functions work in Python? - Stack Overflow

    When Python sees "f (3)" it takes it to means "execute the function object pointed to be variable f and pass it the value 3". f and g and different function objects and so return different values.

  2. Understanding the main method of python - Stack Overflow

    $ python using_name.py This program is being run by itself $ python >>> import using_name I am being imported from another module >>> How It Works - Every Python module has it's …

  3. Why is my Python function not being executed? - Stack Overflow

    Apr 15, 2015 · "why does python allow for code outwith the functions?" : because even the def and class statements are executable statements, and are indeed executed when the module is …

  4. What exactly is "lambda" in Python? - Stack Overflow

    Mar 8, 2011 · 2 Lambda functions are not a Python specific concept, but are a general programming term for anonymous function, i.e. functions without a name. In Python they are …

  5. What does the "at" (@) symbol do in Python? - Stack Overflow

    Functions, in Python, are first class objects - which means you can pass a function as an argument to another function, and return functions. Decorators do both of these things. If we …

  6. How do Python's any and all functions work? - Stack Overflow

    58 How do Python's any and all functions work? any and all take iterables and return True if any and all (respectively) of the elements are True.

  7. python - Understanding the map function - Stack Overflow

    Jun 11, 2012 · The Python 2 documentation says: Built-in Functions: map (function, iterable, ...) Apply function to every item of iterable and return a list of the results. If additional iterable …

  8. python - What is the purpose of the return statement? How is it ...

    15 In python, we start defining a function with def, and generally - but not necessarily - end the function with return. Suppose we want a function that adds 2 to the input value x. In …

  9. How can I use a global variable in a function? - Stack Overflow

    Jul 11, 2016 · In Python, the module is the natural place for global data: Each module has its own private symbol table, which is used as the global symbol table by all functions defined in the …

  10. Basic explanation of python functions - Stack Overflow

    Sep 5, 2015 · The Python language, like many others, already has a set of built-in functionality. The function named print is an example of this. You can get a lot of information using the …