About 627,000 results
Open links in new tab
  1. python - Is there a difference between "==" and "is"? - Stack Overflow

    Since is for comparing objects and since in Python 3+ every variable such as string interpret as an object, let's see what happened in above paragraphs. In python there is id function that shows a …

  2. Using or in if statement (Python) - Stack Overflow

    Using or in if statement (Python) [duplicate] Asked 7 years, 5 months ago Modified 8 months ago Viewed 148k times

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

    May 24, 2024 · This "underscoring" seems to occur a lot, and I was wondering if this was a requirement in the Python language, or merely a matter of convention? Also, could someone …

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

  5. 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 in …

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

  7. python - Errno 13 Permission denied - Stack Overflow

    Jul 16, 2020 · For future searchers, if none of the above worked, for me, python was trying to open a folder as a file. Check at the location where you try to open the file, if you have a folder with …

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

  9. python - Pythonic way to combine for-loop and if-statement - Stack …

    That's how it is... don't overcomplicate things by trying to simplify them. Pythonic does not mean to avoid every explicit for loop and if statement.

  10. operators - Python != operation vs "is not" - Stack Overflow

    In a comment on this question, I saw a statement that recommended using result is not None vs result != None What is the difference? And why might one be recommended over the other?