📜  在 swift 代码示例中设置

📅  最后修改于: 2022-03-11 15:01:02.729000             🧑  作者: Mango

代码示例2
let setExample: Set = ["Apple", "Orange", "Banana", "Apple"]
if setExample.contains("Apple") {
    print("Its healthy")
}
print(setExample)
// OUTPUT:
//Its healthy
//["Orange", "Apple", "Banana"]