Concept Flow - List creation and representation
Start
Create empty list or with elements
Store list in variable
Print or use list
End
This flow shows how a list is created, stored in a variable, and then printed or used.
my_list = [10, 20, 30] print(my_list)
| Step | Action | Variable | Value | Output |
|---|---|---|---|---|
| 1 | Create list with elements | my_list | [10, 20, 30] | |
| 2 | Print list | my_list | [10, 20, 30] | [10, 20, 30] |
| 3 | End of program |
| Variable | Start | After Step 1 | After Step 2 | Final |
|---|---|---|---|---|
| my_list | undefined | [10, 20, 30] | [10, 20, 30] | [10, 20, 30] |
List creation syntax: my_list = [item1, item2, ...] Lists hold ordered items inside square brackets. Elements are separated by commas. Printing a list shows its contents with brackets and commas. Lists can be empty: my_list = [] Lists are stored in variables for later use.