x=["grapes","mango","orange","peach","kiwi","apple","lime","cherry","tomato","blueberry","watermelon"]
a=[]
for i in x:
if i == "apple" or i=="kiwi":
a.append(i.upper())
print(a)
# 추가 방법
# 방법1
ex1=[]
for i in range(len(x)):
if x[i] == "apple" or x[i] =="kiwi":
ex1.append(x[i].upper())
print(f'ex1 결과:{ex1}')
# 방법2
ex2=map(lambda b:b.upper(),(filter(lambda a:a=="apple" or a=="kiwi",x)))
ex2=list(ex2)
print(f"ex2결과:{ex2}")
#방법3
ex3 = [a.upper() for a in x if a=="apple" or a=="kiwi"]
print(f'ex3결과:{ex3}')