Flatten Lists Of Lists

Want to learn more? I recommend these Python books: Python for Data Analysis, Python Data Science Handbook, and Introduction to Machine Learning with Python.

# Create a list containing three lists of names
list_of_lists = [['Amy','Betty','Cathryn','Dana'],
# For each element in list_of_lists, take each element in the list
flattened_list = [i for row in list_of_lists for i in row]
# View the flattened list