Program Console Vignaankosh.com
Execution Panel
Console is empty.
Create a set and display elements 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.
# Create a set using curly braces
fruits = {"Apple", "Banana", "Cherry", "Mango", "Orange"}
print("Set:", fruits)
print("Type:", type(fruits))
# Create set using set() constructor
numbers = set([1, 2, 3, 4, 5])
print("\nUsing set():", numbers)
# Duplicates are automatically removed
duplicate_set = {1, 2, 2, 3, 3, 3, 4}
print(f"\nWith duplicates: {duplicate_set}")
# Display elements using loop
print("\nSet elements:")
for item in fruits:
print(f" {item}")