import Foundationprint("Hello, World!")let emptyArray1 = []let empryArray2 = []var shoppingList = ["1","2","3","4","5"]print(shoppingList.count)print(shoppingList[1])shoppingList[1] = "bottle of water"print(shoppingList[1])let emptyDic = [:]let emptyDic1 = Dictionary()
var occupations = [
"My":"I",
"U":"you"
]
print(occupations["My"])
occupations["LL"] = "KKK"
print("the occupation count is" + String (occupations.count) )
var shoppIng = ["小米","大米","玉米","糯米"]
shoppIng.append("红米")
print(shoppIng)
shoppIng.insert("英语", atIndex: 2)
print(shoppIng)
shoppIng += ["白菜","西瓜"]
//shoppIng += "白菜"
print(shoppIng)
print(shoppIng.isEmpty)
print(shoppIng.count)
print(shoppIng.capacity)
网友评论