Program Console Vignaankosh.com
Execution Panel
Console is empty.
Method 8: Swap using single line input with unpacking is an interactive PYTHON dry run visualizer from the Io 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.
# Method 8: Swap using single line input
print("Enter two numbers separated by space:")
# Read and swap in one line
a, b = map(int, input().split())
print(f"Original: a = {a}, b = {b}")
# Swap using tuple unpacking
a, b = b, a
print(f"Swapped: a = {a}, b = {b}")