惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
有赞技术团队
有赞技术团队
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
Blog — PlanetScale
Blog — PlanetScale
博客园_首页
L
LangChain Blog
Stack Overflow Blog
Stack Overflow Blog
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
罗磊的独立博客
T
Tailwind CSS Blog
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
博客园 - Franky
B
Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
F
Fortinet All Blogs

博客园 - 紫色物语

多个nginx之间如何实现反向代理和负责均衡 docker相关知识 spring boot+mybatis 系列 springboot+dockfile @log的decorator完美实现(原创) 配置nginx输入任何地址都跳转至维护页面 0005python中的静态方法和类方法 0004python中的map,reduce,lambda,filter 0003python中的可变参数 0000python中文乱码解决方案 0001python中特殊的for迭代zip函数 年度热门开源项目 SSO 不同服务器数据库之间的数据操作 自动构建部署 EF 性能调优 断点续传 gis 相关资料 easyui 特殊操作
0002python中dict和list的特殊构造
紫色物语 · 2017-02-03 · via 博客园 - 紫色物语

>>> myinfor = {"name":"qiwsir","site":"qiwsir.github.io","lang":"python"}

>>> dict(zip(myinfor.values(),myinfor.keys()))

'qiwsir''name', 'python''lang', 'qiwsir.github.io''site'}

>>> seasons = ['Spring', 'Summer', 'Fall', 'Winter']

>>> list(enumerate(seasons))

[(0, 'Spring'), (1, 'Summer'), (2, 'Fall'), (3, 'Winter')]

>>> list(enumerate(seasons, start=1))

[(1, 'Spring'), (2, 'Summer'), (3, 'Fall'), (4, 'Winter')]

>>> squares = [x**2 for x in range(1,10)]

>>> squares

[1, 4, 9, 16, 25, 36, 49, 64, 81]