About 50 results
Open links in new tab
  1. 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 _.

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

  3. python - How do I create variable variables? - Stack Overflow

    It would be better to discuss the problems in your Python code than how to solve them with variables that automatically change their name at run time, which is a very quick recipe to …

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

  5. How can I access environment variables in Python?

    I haven’t set it (PYTHONPATH) before; what I am doing just go with command prompt and type CMD anywhere (since python.exe is in my shell PATH). If I try to access Window …

  6. 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, …

  7. 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, 10 months ago Modified 1 year, 2 months ago Viewed 313k times

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

  9. python - Viewing all defined variables - Stack Overflow

    Mar 11, 2009 · I'm currently working on a computation in python shell. What I want to have is Matlab style listout where you can see all the variables that have been defined up to a point …

  10. Keep persistent variables in memory between runs of Python script ...

    Jul 14, 2011 · Keep persistent variables in memory between runs of Python script Asked 14 years, 7 months ago Modified 2 years, 2 months ago Viewed 96k times