Python Operators

You can use operators in Python to perform a variety of operations.

Here is an overview:

  • Arithmetic operators: With these operators, we can perform calculations like addition, subtraction, multiplication, etc.
  • Assignment operators: This operator assigns values to variables.
  • Comparison operators: The comparison operator compares two values and returns a boolean result (True or False).
  • Logical operators: With logical operators, we can combine conditional statements.
  • Membership operators: These operators check if an item exists in another item like a string, list, tuple, or dictionary.
  • Identity operators: The identity operators check if variables point to the same object in memory.
  • Bitwise operators: These operators can compare binary numbers and are mostly used in mathematical calculations.

In the next lessons, we’ll cover all these operators in detail with examples.

Sign up for FREE to Continue Reading

Here's what you'll get:

  • Full Access to this lesson + 387 more.
  • Learn CCNA, CCNP and CCIE R&S. Explained as simple as possible.
  • Unlock Access to 424 lessons by becoming a member.
  • New Lessons Added Regularly. You'll Be the First to Know.
  • Content created by Rene Molenaar (CCIE #41726)

Takes 1 minute - No credit card needed


Ask a question or start a discussion by visiting our Community Forum