gpt4 book ai didi

ios - 合并两个数组的每个元素并附加到一个数组

转载 作者:行者123 更新时间:2023-11-28 10:28:04 25 4
gpt4 key购买 nike

<分区>

我有两个如下所示的数组。我需要将两个数组的每个数据组合起来并附加到一个数组。例子是:

var d1 = ["1", "2", "3", "4", "5"]
var d2 = ["A", "B", "C", "D", "E"]
var d3 = [String]()

//O/P needed : ["1-A","2-B","3-C","4-D","5-E"]

任何帮助都会很棒。谢谢

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com