回答編集履歴
2
わける。
test
CHANGED
@@ -9,3 +9,33 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
でいいでしょうか?
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
【追記】
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
一つ一つ分けて書くとこうなります。
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
```swift
|
24
|
+
|
25
|
+
let country = countryArr[2] //egypt
|
26
|
+
|
27
|
+
print(country)
|
28
|
+
|
29
|
+
//=> (100, "カイロ", "Africa")
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
let location = country.location
|
34
|
+
|
35
|
+
print(location)
|
36
|
+
|
37
|
+
//=> Africa
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
|
1
output
test
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
```swift
|
2
2
|
|
3
3
|
print(countryArr[0].capital)
|
4
|
+
|
5
|
+
//=> ワシントン
|
4
6
|
|
5
7
|
```
|
6
8
|
|