Arrays
An array is like a collection of items, and each item is of the same type. You can think of a 1D array like a list and a 2D array like a table. 1D Arrays Creating a 1D Array: Let's imagine you have a collection of action figures, and you want to remember all their names. You can use a 1D array to store these names. Here's how you would do that in Python: action_figures = ["Spiderman", "Ironman", "Batman", "Superman"] Accessing Elements in a 1D Array: You can access any action figure's name by referring to its position (or index) in the array. In Python, the index starts at 0, so Spiderman is at index 0, Ironman is at index 1, and so on. Here's how you can access "Batman": print(action_figures[2]) # this will print "Batman" Changing Elements in a 1D Array: What if you got a new action figure and wanted to replace "Batman" with "Hulk"? You can change an element in the array like this: a