Program Console Vignaankosh.com
Execution Panel
Console is empty.
Print String Character by Character is an interactive PYTHON dry run visualizer from the Strings 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.
# Python program to print string character by character
text = "Python"
# Method 1: Using for loop
print("Method 1 (for loop):", end=" ")
for char in text:
print(char, end=" ")
# Method 2: Using while loop with index
print("\nMethod 2 (while loop):", end=" ")
i = 0
while i < len(text):
print(text[i], end=" ")
i = i + 1
# Method 3: Using enumerate to get index and character
print("\nMethod 3 (enumerate):", end=" ")
for index, char in enumerate(text):
print(char, end=" ")
print() # New line