About 28,500,000 results
Open links in new tab
  1. What is the naming convention in Python for variables and …

    39 As mentioned, PEP 8 says to use lower_case_with_underscores for variables, methods and functions. I prefer using lower_case_with_underscores for variables and mixedCase for …

  2. python - Why do some functions have underscores "__" before …

    In Python, the use of an underscore in a function name indicates that the function is intended for internal use and should not be called directly by users. It is a convention used to indicate that …

  3. 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 …

  4. 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 …

  5. python - How do I call a function from another .py file ... - Stack ...

    function(a, b) Note that file is one of Python's core modules, so I suggest you change the filename of file.py to something else. Note that if you're trying to import functions from a.py to a file …

  6. python - How to run functions in parallel? - Stack Overflow

    I am trying to run multiple functions in parallel in Python. I have something like this: files.py import common #common is a util class that handles all the IO stuff dir1 = 'C:\\folder1' dir2 = 'C:\\

  7. python - How do I get ("return") a result (output) from a function?

    We can make a tuple right on the return line; or we can use a dictionary, a namedtuple (Python 2.6+), a types.simpleNamespace (Python 3.3+), a dataclass (Python 3.7+), or some other …

  8. python - Apply multiple functions to multiple groupby columns

    What I want to do is apply multiple functions to several columns (but certain columns will be operated on multiple times). Also, some functions will depend on other columns in the groupby …

  9. Call a python function from jinja2 - Stack Overflow

    May 18, 2011 · I am using jinja2, and I want to call a python function as a helper, using a similar syntax as if I were calling a macro. jinja2 seems intent on preventing me from making a …

  10. python - How do I pass variables across functions? - Stack Overflow

    I want to pass values (as variables) between different functions. For example, I assign values to a list in one function, then I want to use that list in another function: list = [] def defineALis...