Question: what is the difference between == and is?
Answer: Difference between == and is operator in Python The == operator compares the values of both the operands and checks for value equality. Whereas is operator checks whether both the operands refer to the same object or not. Output of the first if condition is “True” as both list1 and list2 are empty lists.