python函数高级话题二:迭代、解析、测试和嵌套循环
python函数高级话题二:迭代、解析、测试和嵌套循环。学着,记着,将来用上继续深入研究。做一遍,增加脑子深处记忆。for… for…print("===========函数高级话题二:函数迭代和解析================")res = []for i in 'spam': res.append(ord(i)) #ord函数收集整个字符串中所有字符的ASCII编码print(res)res = [ord(i) for i in 'spam']print(r