lists and functions

 

So we have two ways to iterate through a list. The first method is good for looping however you can't modify it. Method two is used to not only loop a list but also to modify it using an index

So we have two ways to iterate through a list. The first method is good for looping however you can’t modify it. Method two is used to not only loop a list but also to modify it using an index

We create a function that takes the argument words. However it will be made as a list. Following that we create a result that takes quote marks. We then iterate them and finally we return, So the result turns the name

We create a function that takes the argument words. However it will be made as a list. Following that we create a result that takes quote marks. We then iterate them and finally we return, So the result turns the name

simply make a variable called join lists having x and y being the arguments. We then combine them.

simply make a variable called join lists having x and y being the arguments. We then combine them.

For the last exercise we define a function called flatten with an argument of lists. Then we make a empty list and iterate it using a loop with a variable called "numbers", After iterating and we .append to the results and then we return.

For the last exercise we define a function called flatten with an argument of lists. Then we make a empty list and iterate it using a loop with a variable called “numbers”, After iterating and we .append to the results and then we return.

Overall this assignment’s goal was to focus on the usage of lists. Beyond learning about lists we need to know how to modify a list using a looping function. A list is used to keep information organized and if you need something that needs to me added, removed, or modified we have two methods of doing so however only one allows us to modify it’s content.