<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Introduction
When doing data science, you need a way to organize your data so you can work with it efficiently.  Python has many data structures available for holding your data, such as lists, sets, dictionaries, and tuples.  In this tutorial, you will learn how to work with Python lists.
Motivation
In the Petal to the Metal competition, your goal is to classify the species of a flower based only on its image.  (This is a common task in computer vision, and it is called image classification.)  Towards this goal, say you organize the names of the flower species in the data.  
One way to do this is by organizing the names in a Python string.
Step1:  Even better is to represent the same data in a Python list.  To create a list, you need to use square brackets ([, ]) and separate each item with a comma.  Every item in the list is a Python string, so each is enclosed in quotation marks.
Step2:  At first glance, it doesn't look too different, whether you represent the information in a Python string or list.  But as you will see, there are a lot of tasks that you can more easily do with a list.  For instance, a list will make it easier to
Step3:  Indexing
We can refer to any item in the list according to its position in the list (first, second, third, etc).  This is called indexing.
Note that Python uses zero-based indexing, which means that
Step4:  Side Note
Step5:  As you can see above, when we slice a list, it returns a new, shortened list.
Removing items
Remove an item from a list with .remove(), and put the item you would like to remove in parentheses.
Step6:  Adding items
Add an item to a list with .append(), and put the item you would like to add in parentheses.
Step7:  Lists are not just for strings
So far, we have only worked with lists where each item in the list is a string.  But lists can have items with any data type, including booleans, integers, and floats.
As an example, consider hardcover book sales in the first week of April 2000 in a retail store.
Step8:  Here, hardcover_sales is a list of integers.  Similar to when working with strings, you can still do things like get the length, pull individual entries, and extend the list.
Step9:  You can also get the minimum with min() and the maximum with max().
Step10:  To add every item in the list, use sum().
Step11:  We can also do similar calculations with slices of the list.  In the next code cell, we take the sum from the first five days (sum(hardcover_sales[
<ASSISTANT_TASK:>
Python Code:
flowers = "pink primrose,hard-leaved pocket orchid,canterbury bells,sweet pea,english marigold,tiger lily,moon orchid,bird of paradise,monkshood,globe thistle"
print(type(flowers))
print(flowers)
Explanation: Introduction
When doing data science, you need a way to organize your data so you can work with it efficiently.  Python has many data structures available for holding your data, such as lists, sets, dictionaries, and tuples.  In this tutorial, you will learn how to work with Python lists.
Motivation
In the Petal to the Metal competition, your goal is to classify the species of a flower based only on its image.  (This is a common task in computer vision, and it is called image classification.)  Towards this goal, say you organize the names of the flower species in the data.  
One way to do this is by organizing the names in a Python string.
End of explanation
flowers_list = ["pink primrose", "hard-leaved pocket orchid", "canterbury bells", "sweet pea", "english marigold", "tiger lily", "moon orchid", "bird of paradise", "monkshood", "globe thistle"]
print(type(flowers_list))
print(flowers_list)
Explanation: Even better is to represent the same data in a Python list.  To create a list, you need to use square brackets ([, ]) and separate each item with a comma.  Every item in the list is a Python string, so each is enclosed in quotation marks.
End of explanation
# The list has ten entries
print(len(flowers_list))
Explanation: At first glance, it doesn't look too different, whether you represent the information in a Python string or list.  But as you will see, there are a lot of tasks that you can more easily do with a list.  For instance, a list will make it easier to:
- get an item at a specified position (first, second, third, etc), 
- check the number of items, and
- add and remove items.
Lists
Length
We can count the number of entries in any list with len(), which is short for "length".  You need only supply the name of the list in the parentheses.
End of explanation
print("First entry:", flowers_list[0])
print("Second entry:", flowers_list[1])
# The list has length ten, so we refer to final entry with 9
print("Last entry:", flowers_list[9])
Explanation: Indexing
We can refer to any item in the list according to its position in the list (first, second, third, etc).  This is called indexing.
Note that Python uses zero-based indexing, which means that:
- to pull the first entry in the list, you use 0,
- to pull the second entry in the list, you use 1, and
- to pull the final entry in the list, you use one less than the length of the list.
End of explanation
print("First three entries:", flowers_list[:3])
print("Final two entries:", flowers_list[-2:])
Explanation: Side Note: You may have noticed that in the code cell above, we use a single print() to print multiple items (both a Python string (like "First entry:") and a value from the list (like flowers_list[0]).  To print multiple things in Python with a single command, we need only separate them with a comma.
Slicing
You can also pull a segment of a list (for instance, the first three entries or the last two entries).  This is called slicing.  For instance:
- to pull the first x entries, you use [:x], and
- to pull the last y entries, you use [-y:].
End of explanation
flowers_list.remove("globe thistle")
print(flowers_list)
Explanation: As you can see above, when we slice a list, it returns a new, shortened list.
Removing items
Remove an item from a list with .remove(), and put the item you would like to remove in parentheses.
End of explanation
flowers_list.append("snapdragon")
print(flowers_list)
Explanation: Adding items
Add an item to a list with .append(), and put the item you would like to add in parentheses.
End of explanation
hardcover_sales = [139, 128, 172, 139, 191, 168, 170]
Explanation: Lists are not just for strings
So far, we have only worked with lists where each item in the list is a string.  But lists can have items with any data type, including booleans, integers, and floats.
As an example, consider hardcover book sales in the first week of April 2000 in a retail store.
End of explanation
print("Length of the list:", len(hardcover_sales))
print("Entry at index 2:", hardcover_sales[2])
Explanation: Here, hardcover_sales is a list of integers.  Similar to when working with strings, you can still do things like get the length, pull individual entries, and extend the list.
End of explanation
print("Minimum:", min(hardcover_sales))
print("Maximum:", max(hardcover_sales))
Explanation: You can also get the minimum with min() and the maximum with max().
End of explanation
print("Total books sold in one week:", sum(hardcover_sales))
Explanation: To add every item in the list, use sum().
End of explanation
print("Average books sold in first five days:", sum(hardcover_sales[:5])/5)
Explanation: We can also do similar calculations with slices of the list.  In the next code cell, we take the sum from the first five days (sum(hardcover_sales[:5])), and then divide by five to get the average number of books sold in the first five days.
End of explanation
<END_TASK>