Run ❯
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
fruits = ["apple", "banana", "cherry", "kiwi", "mango"] newlist = [x if x != "banana" else "orange" for x in fruits] print(newlist)
['apple', 'orange', 'cherry', 'kiwi', 'mango']