Program Console Vignaankosh.com
Execution Panel
Console is empty.
Traverse tuple using for loop is an interactive PYTHON dry run visualizer from the Tuples 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.
# Different ways to traverse a tuple
weekdays = ("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")
print("Tuple:", weekdays)
print("\n1. Direct element access:")
for day in weekdays:
print(f" {day}")
print("\n2. Using index with range():")
for i in range(len(weekdays)):
print(f" Index {i}: {weekdays[i]}")
print("\n3. Using enumerate():")
for idx, day in enumerate(weekdays):
print(f" {idx} → {day}")