1.Swift 移除数组中指定元素 使用 filter函数 let a = 1 let b = 2 let c = 3 var arr = [a,b,c,4] let arr2 = arr.filter{$0 != a} print(arr2)