About 678,000 results
Open links in new tab
  1. What does colon equal (:=) in Python mean? - Stack Overflow

    In Python this is simply =. To translate this pseudocode into Python you would need to know the data structures being referenced, and a bit more of the algorithm implementation. Some notes …

  2. python - Importing files from different folder - Stack Overflow

    I have this folder structure: application ├── app │ └── folder │ └── file.py └── app2 └── some_folder └── some_file.py How can I import a function from file.py, from within som...

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

    An @ symbol at the beginning of a line is used for class and function decorators: PEP 318: Decorators Python Decorators - Python Wiki The most common Python decorators are: …

  4. python - Find the current directory and file's directory - Stack …

    How do I determine: the current directory (where I was in the shell when I ran the Python script), and where the Python file I am executing is?

  5. syntax - Python integer incrementing with ++ - Stack Overflow

    In Python, you deal with data in an abstract way and seldom increment through indices and such. The closest-in-spirit thing to ++ is the next method of iterators.

  6. python - How do I terminate a script? - Stack Overflow

    also sys.exit () will terminate all python scripts, but quit () only terminates the script which spawned it. David C. Over a year ago Do you know if this command works differently in python …

  7. How do I measure elapsed time in Python? - Stack Overflow

    The python cProfile and pstats modules offer great support for measuring time elapsed in certain functions without having to add any code around the existing functions.

  8. python - How can I add new keys to a dictionary? - Stack Overflow

    How do I add a new key to an existing dictionary? It doesn't have an .add () method.

  9. How to step through Python code to help debug issues?

    In Java/C# you can easily step through code to trace what might be going wrong, and IDE's make this process very user friendly. Can you trace through python code in a similar fashion?

  10. python - Automatically create file 'requirements.txt' - Stack Overflow

    Sometimes I download the Python source code from GitHub and don't know how to install all the dependencies. If there isn't any requirements.txt file I have to create it by hand. Given the …