- iOS 12 Programming for Beginners
- Craig Clayton
- 54字
- 2021-07-02 15:05:03
Iterating over dictionary keys and values
When you need to iterate over both dictionary keys and values using a for...in loop, you use the following:
for (key, value) in dictPizzas { print("\(key): \(value)") }
Your code and output should now look like this:

We have successfully looked at how to loop through a dictionary.
推薦閱讀
- 網絡教育學習指導
- EJB 3.1從入門到精通
- MERN Quick Start Guide
- SEO 20日
- 物聯網安全與深度學習技術
- Learning QGIS 2.0
- SSL VPN : Understanding, evaluating and planning secure, web/based remote access
- 企業網絡安全管理
- Yii Application Development Cookbook(Second Edition)
- CCNP TSHOOT(642-832)認證考試指南
- Working with Legacy Systems
- Hands-On Microservices with Node.js
- 網絡綜合布線(第2版)
- 物聯網,So Easy!
- 走近奇妙的物聯網