特牛网址导航

9. 循环的技巧——Python官网语法摘录_knights = {'gallahad': 'the pure', 'robin': 'the b-CSDN博客

网友收藏
文章浏览阅读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