PTA Python 植物与颜色

img

n=int(input())
color=['red','orange']
fo=['rose','poppies']
for i in range(n):
    r=input()
    if r in color:
        print('{} are {}'.format(fo[color.index(r)],r))
    else:
        print('-------')

大概就是这样吧