Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
Menu
×
×
Correct!
Exercise:
Check if "apple" is present in the fruits set.
fruits = {"apple", "banana", "cherry"}
if "apple" @(2) fruits:
print("Yes, apple is a fruit!")
fruits = {"apple", "banana", "cherry"}
if "apple" in fruits:
print("Yes, apple is a fruit!")