
Learning outcomes
By the end of this chapter, you should be able to:- use assignment and augmented assignment operators
- distinguish identity and equality
- use membership operators with strings/lists
- apply bitwise operators at basic level
Assignment operators
+=, -=, *=, /=, //=, %=
Identity operators
is, is not
Membership operators
in, not in
Bitwise operators (intro)
&, |, ^, ~, <<, >>
Conditional expression (ternary)
Exam-focused points
==checks value equalityischecks object identity- membership is very common in string/list questions
- know at least one solved bitwise example
Practice questions
- Show output:
- Write program to check if a character is a vowel using
in. - Demonstrate difference between
==andiswith list example.
