Adding items to lists
We have some data that contains a mixture of flowers and shrubs, in a list.
Our customer would like two separate lists.
One, called flowers will contain only flowers, and the other, not surprisingly called shrubs, must contain only shrubs.
Write code to populate the two lists with the appropriate plants from data.
Write your code below the comment, starting on line 27.
There is no need to print the lists, but you can if you wish.
exercise.py
solution oct
I
1 - data = [
"Andromeda - Shrub",
"Bellflower - Flowers,
China Pink - Flower",
-Daffodil - Flower
6
"Evening Primrose - Flower",
7
-French Marigold Flower",
*Hydrangea Shrub",
Iris - Flower",
10
*Japanese Camellia
Shrub",
11
-Lavender Shrub",
12
-Lilac- Shrub",
13 *Magnolia - Shrub",
14
"Peory Shrub"
"Queen Anne's Lace - Flower",
*Red Hot Poker - Flower",
17
*Snapdragon - Flower",
13
Sunflower - Fiower,
19 *Tiger Lily
Flower,
witch Hazel - Shrub",
21
Reset code
Check solution
Continue
Answers
Answered by
0
Answer:
nrhkrkehkegkeykeykywkjwg
Explanation:
Similar questions