While printing an array how to get rid of brackets from left and right?
var array = [\"1\", \"2\", \"3\", \"4\"] println(\"\\(array)\") //It prints [1, 2, 3,
(This works for Swift 5)
let array = [1,2,3,4,5] var output = "" for number in array{ output += ", \(number)" }