beginnerPython
What types of operators are available in Python?
Answer
Clear, interview-ready explanation
Python provides the following main types of operators:
-
Arithmetic operators:
,+,-,*,/,//,%** -
Comparison operators:
,==,!=,>,<,>=<= -
Assignment operators:
,=,+=,-=,*=,/=,//=,%=**= -
Logical operators:
,and,ornot -
Identity operators:
,isis not -
Membership operators:
,innot in -
Bitwise operators:
,&,|,^,~,<<>>
Each category performs a specific type of operation, such as calculations, comparisons, condition checking, or bit manipulation.