I am taking my very first programming class ad kind of stump on the problem mention in this post.. In coding I only got so far as what shows here....
- Write Python statements corresponding to the following:
a. Assign to variable flowers a list containing strings 'rose', 'bougainvillea', 'yucca', 'marigold','daylilly', and 'lilly of the valley'.
b. Write a Boolean expression that evaluates to True if string 'potato' is in list flowers, and evaluate the expression.
c. Assign to list thorny the sublist of list flowers consisting of the first three objects in the list.
d. Assign to list poisonous the sublist of list flowers consisting of just the last object of list flowers.
e. Assign to list dangerous the concatenation of lists thorny and poisonous.
flowers = ['rose', 'bougainvillea', 'yucca', 'marigold', 'daylilly', 'lilly of the valley']
'potatoe' in flowers