- 链接地址:https://blog.csdn.net/blueicex2017/article/details/107444361
- 链接标题:9. 循环的技巧——Python官网语法摘录_knights = {'gallahad': 'the pure', 'robin': 'the b-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:9258
文章浏览阅读249次。1. 字典取key和value>>> knights = {'gallahad': 'the pure', 'robin': 'the brave'}>>> for k, v in knights.items():... print(k, v)...gallahad the purerobin the brave2. 序列取key和value>>> for i, v in enumerate(['tic', 'tac', 'to_knights = {'gallahad': 'the pure', 'robin': 'the brave'}for k, v in knig
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除