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

    Mar 21, 2023 · 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 …

  2. Is there a "not equal" operator in Python? - Stack Overflow

    Jun 16, 2012 · There are two operators in Python for the "not equal" condition - a.) != If values of the two operands are not equal, then the condition becomes true. (a != b) is true.

  3. python - `from ... import` vs `import .` - Stack Overflow

    Feb 25, 2012 · I'm wondering if there's any difference between the code fragment from urllib import request and the fragment import urllib.request or if they are interchangeable. If they are …

  4. What does [:-1] mean/do in python? - Stack Overflow

    Mar 20, 2013 · Working on a python assignment and was curious as to what [:-1] means in the context of the following code: instructions = f.readline()[:-1] Have searched on here on S.O. …

  5. python - SSL: CERTIFICATE_VERIFY_FAILED with Python3 - Stack …

    Sep 2, 2017 · Go to the folder where Python is installed, e.g., in my case (Mac OS) it is installed in the Applications folder with the folder name 'Python 3.6'. Now double click on 'Install …

  6. python - Iterating over dictionaries using 'for' loops - Stack Overflow

    Jul 21, 2010 · Why is it 'better' to use my_dict.keys() over iterating directly over the dictionary? Iteration over a dictionary is clearly documented as yielding keys. It appears you had Python 2 …

  7. 'Python not found' despite having been installed [duplicate]

    Feb 28, 2021 · The Python application path, which is the folder where you originally installed Python; and The Python Scripts path. The Scripts folder should be located within the Python …

  8. What is the difference between @staticmethod and …

    Sep 26, 2008 · What is the difference between a method decorated with @staticmethod and one decorated with @classmethod?

  9. python - How do I check if a variable exists? - Stack Overflow

    May 9, 2009 · I want to check if a variable exists. Now I'm doing something like this: try: myVar except NameError: # Do something. Are there other ways without exceptions?

  10. 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?