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. What does the "at" (@) symbol do in Python? - Stack Overflow

    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 decorator do in …

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

  4. slice - How slicing in Python works - Stack Overflow

    Python slicing is a computationally fast way to methodically access parts of your data. In my opinion, to be even an intermediate Python programmer, it's one aspect of the language that it …

  5. How do I declare custom exceptions in modern Python?

    By "modern Python" I mean something that will run in Python 2.5 but be 'correct' for the Python 2.6 and Python 3.* way of doing things. And by "custom" I mean an Exception object that can …

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

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

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

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

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

    6 I think it would also be useful to point out Python's collections module that consists of many useful dictionary subclasses and wrappers that simplify the addition and modification of data …

    • Site icon
      cornell.edu
      https://online.cornell.edu
      About our ads

      Python Certificates | Earn a Cornell Certificate

      SponsoredTopics include: Python Programming, Python for Data Science and Python Data Visualization. Become a stronger data scientist and solve complex business problems with Python.
    • Site icon
      training.certstaff.com
      https://training.certstaff.com › Certstaffix › Training
      About our ads

      Classes Starting at $700 | Short Python Courses

      SponsoredGet Python Training Details: Training Methods, Prices and Course Descriptions. Learn Python Programming Skills Fast With Certstaffix Training.