Function to reverse a string Dry Run in PYTHON

Function to reverse a string is an interactive PYTHON dry run visualizer from the Functions 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.

Function to reverse a string Program Code

def reverse_string(s):
    """Reverse a string using slicing"""
    return s[::-1]

text = "Programming"
print(f"Original: {text}")
print(f"Reversed: {reverse_string(text)}")

View the complete Functions programs page.

Program Console Function to reverse a string Topic: PYTHON Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.