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

    Nov 25, 2023 · Although in Python we normally say that exceptions are raised rather than thrown, but I guess that's just a minor point. But you might like to mention that it raises a NameError, …

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

  3. What does colon equal (:=) in Python mean? - Stack Overflow

    What does the := operand mean, more specifically for Python? Can someone explain how to read this snippet of code? node := root, cost = 0 frontier := priority queue containing node only …

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

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

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

    Jan 7, 2009 · If you are trying to close a question where someone should be using this idiom and isn't, consider closing as a duplicate of Why is Python running my module when I import it, and …

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

    Functions, in Python, are first class objects - which means you can pass a function as an argument to another function, and return functions. Decorators do both of these things.

  8. What is :: (double colon) in Python when subscripting sequences?

    Aug 10, 2010 · I know that I can use something like string[3:4] to get a substring in Python, but what does the 3 mean in somesequence[::3]?

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

    Aug 31, 2008 · See What do ** (double star/asterisk) and * (star/asterisk) mean in a function call? for the complementary question about arguments.

  10. What is the purpose of the single underscore "_" variable in Python?

    May 5, 2011 · As far as the Python languages is concerned, _ generally has no special meaning. It is a valid identifier just like _foo, foo_ or _f_o_o_. The only exception are match statements …