이렇게 쓰니까 엄청 별거 없네.. ㅎㅎㅎㅎㅎ
func solution(_ s:String) -> String {
let center = s.count / 2
var arr: [String] = []
var answer = ""
for index in s.indices {
arr.append(String(s[index]))
}
if s.count % 2 == 0 {
answer = arr[center-1] + arr[center]
}else {
answer = arr[center]
}
return answer
}