[Type A] Python Revision Tour-1 – Chapter 1
Table of Contents
8. What are operators? What is their function? Give examples of some unary and binary operators.
Operators in Python are symbols or keywords that perform operations on operands. They can be unary (operating on a single operand) or binary (operating on two operands).
Some examples of unary operators:
-
: Negationnot
: Logical NOT
Some examples of binary operators:
+
: Addition-
: Subtraction*
: Multiplication