TA貢獻(xiàn)1839條經(jīng)驗 獲得超15個贊
TA貢獻(xiàn)1811條經(jīng)驗 獲得超6個贊
let array = [111, 222, 111]
var dictInts = Dictionary<String, Int>()
for number in array {
dictInts[String(number)] = number
}
var result = [Int]()
for value in dictInts.values {
result.append(value)
print(result)
舉報
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號