Run »
fruits = ["apple", "banana", "cherry", "kiwi", "mango"] newlist = [x if x != "banana" else "orange" for x in fruits] print(newlist)
['apple', 'orange', 'cherry', 'kiwi', 'mango']