About 7,620,000 results
Open links in new tab
  1. What do the symbols "=" and "==" mean in python? When is each …

    Nov 25, 2023 · The simple answer is = is an assignment operator, == is a comparison operator. And you are wrong in saying that == can be used in any situation when = works. For example …

  2. python - What do these operators mean ... - Stack Overflow

    Mar 4, 2013 · However, Python 3 changed the behavior of / to perform floating-point division even if the arguments are integers. The // operator was introduced in Python 2.6 and Python 3 to …

  3. What does asterisk * mean in Python? - Stack Overflow

    Does * have a special meaning in Python as it does in C? I saw a function like this in the Python Cookbook: def get (self, *a, **kw) Would you please explain it to me or point out where I can …

  4. syntax - What do >> and << mean in Python? - Stack Overflow

    Apr 3, 2014 · 15 The other case involving print >>obj, "Hello World" is the "print chevron" syntax for the print statement in Python 2 (removed in Python 3, replaced by the file argument of the …

  5. python - What exactly does += do? - Stack Overflow

    What exactly do we mean by "storing the result in a"? python variables don't store values directly they store references to objects. In python the answers to both of these questions depend on …

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

    Jun 17, 2011 · 96 What does the “at” (@) symbol do in Python? @ symbol is a syntactic sugar python provides to utilize decorator, to paraphrase the question, It's exactly about what does …

  7. python - What does if __name__ == "__main__": do? - Stack Overflow

    Jan 7, 2009 · When Python loads a source code file, it executes all of the code found in it. (Note that it doesn't call all of the methods and functions defined in the file, but it does define them.)

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

  9. python - What does ** (double star/asterisk) and * (star/asterisk) …

    Aug 31, 2008 · What do *args and **kwargs mean in these function definitions? def foo(x, y, *args): pass def bar(x, y, **kwargs): pass See What do ** (double star/asterisk) and * …

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