Apple

Report a typo

Look at the code below:

fruit_dictionary = {}
fruit_dictionary.setdefault("apple", "green")
fruit_dictionary.setdefault("banana", "yellow")
fruit_dictionary.setdefault("orange", "orange")

What will be the output of the following code?

print(fruit_dictionary.setdefault("apple", "red"))

Write the word without quotations, for example, apple

Enter a short text
___

Create a free account to access the full topic