标签:转化 asc dict code pre ascii nbsp item 遍历字典
s = {} for num in range(97,123): # 97到122分别为a到z的ASCII编码,che()用于转化为字母 zimu = chr(num) s[num] = zimu print(s) # 遍历字典需dict后加.items for k,v in s.items(): print(k,">>>",v)
标签:转化 asc dict code pre ascii nbsp item 遍历字典
原文地址:https://www.cnblogs.com/chenxiaokaikai/p/9746481.html