Program Console Vignaankosh.com
Execution Panel
Console is empty.
Display unique characters in string is an interactive PYTHON dry run visualizer from the Sets 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.
# Display unique characters in a string
text = "Hello World Programming"
print(f"Original: '{text}'")
# Get unique characters
unique_chars = set(text)
print(f"\nUnique characters: {unique_chars}")
print(f"Count of unique characters: {len(unique_chars)}")
# Display in sorted order
sorted_unique = sorted(set(text))
print(f"\nSorted unique characters: {sorted_unique}")
# Display without spaces
no_space = set(text.replace(" ", ""))
print(f"\nWithout spaces: {no_space}")
# Only alphabets
only_alpha = set(ch for ch in text if ch.isalpha())
print(f"Only alphabets: {only_alpha}")