Identity Operator (is) vs Equality Check (==) Dry Run in PYTHON

Identity Operator (is) vs Equality Check (==) is an interactive PYTHON dry run visualizer from the Operators programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.

This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.

Identity Operator (is) vs Equality Check (==) Program Code

# Lists have identical values but different addresses
list1 = [1, 2, 3]
list2 = [1, 2, 3]
list3 = list1

# Comparing value equality
print("list1 == list2:", list1 == list2)

# Comparing identity (memory location check)
print("list1 is list2:", list1 is list2)
print("list1 is list3:", list1 is list3)

# Verify that list3 refers to list1
print("list3 == list1:", list3 == list1)

View the complete Operators programs page.

Program Console Identity Operator (is) vs Equality Check (==) Topic: PYTHON Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.