Question: from typing import List def search _ closet ( items: List [ str ] , colour: str ) - > List [ str ] :
from typing import List
def searchclosetitems: Liststr colour: str Liststr:
Return a list containing only the elements from items that are of
colour colour.
Precondition: items contains descriptions of the contents of a
closet where every description has the form 'colour
item', where each colour is one word and each item
is one or more words. For example: grey summer
jacket', 'orange spring jacket', 'red shoes', 'green
hat'
searchclosetred summer jacket', 'orange spring jacket',
'red shoes', 'green hat' 'red'
red summer jacket', 'red shoes'
searchclosetred shirt', 'green pants' 'blue'
searchcloset 'mauve'
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
