About 16,400,000 results
Open links in new tab
  1. python - How do I pass a variable by reference? - Stack Overflow

    Jun 12, 2009 · Python: Python is “pass-by-object-reference”, of which it is often said: “Object references are passed by value.” (read here). Both the caller and the function refer to the same …

  2. How to set environment variables in Python? - Stack Overflow

    I need to set some environment variables in the Python script and I want all the other scripts that are called from Python to see the environment variables' set. If I do, …

  3. What is the purpose of the single underscore "_" variable in Python?

    May 5, 2011 · Underscore _ is considered as " I don't care " or " throwaway " variable in Python The python interpreter stores the last expression value to the special variable called _.

  4. How do I create a multiline Python string with inline variables ...

    How do I create a multiline Python string with inline variables? Asked 13 years, 9 months ago Modified 1 year ago Viewed 311k times

  5. How can I use variables in an SQL statement in Python?

    Jul 13, 2025 · 28 See The Python DB-API interface Be careful when you simply append values of variables to your statements: Imagine a user naming himself ';DROP TABLE Users;' -- That's why …

  6. Is there a standardized method to swap two variables in Python?

    In Python, I've seen two variable values swapped using this syntax: left, right = right, left Is this considered the standard way to swap two variable values or is there some other means by …

  7. How to set environment variables in PyCharm? - Stack Overflow

    Mar 10, 2017 · How to set environment variables in PyCharm? The two most-upvoted answers tell you how to set environment variables for PyCharm Run/Debug Configurations - manually enter …

  8. What is the Python equivalent of static variables inside a function?

    Nov 11, 2008 · In the example below (python 3.5 or greater to use the "f"), the counter variable is defined outside of the function. Defining it as global in the function signifies that the "global" …

  9. Python Variable Declaration - Stack Overflow

    Jun 13, 2012 · I want to clarify how variables are declared in Python. I have seen variable declaration as class writer: path = "" sometimes, there is no explicit declaration but …

  10. How do I save and restore multiple variables in python?

    The question was "How do I save and restore multiple variables in python?" Please update your answer how to handle multiple variables in a pickle, instead of one variable.