标签:
定义一个字典 let interestingNumber = [ "Prime":[2,3,5,7,11,13], "Fibonacci":[1,1,2,3,5,8], "Square":[1,4,9,16,25] ] var array = interestingNumber["Prime"] //那么这应该是一个数组 //但是却不能这样使用 var int_1 = array[0]//会报错 但是可以这样使用 for (kind, numbers) in interestingNumber { for number in numbers { println(numbers[0]) } }
标签:
原文地址:http://www.cnblogs.com/shanyimin/p/4333478.html