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

推荐订阅源

Y
Y Combinator Blog
GbyAI
GbyAI
爱范儿
爱范儿
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
M
MIT News - Artificial intelligence
量子位
宝玉的分享
宝玉的分享
MongoDB | Blog
MongoDB | Blog
V
Visual Studio Blog
罗磊的独立博客
F
Fortinet All Blogs
美团技术团队
博客园_首页
博客园 - 【当耐特】
L
LangChain Blog
月光博客
月光博客
腾讯CDC
The Cloudflare Blog
D
Docker
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

博客园 - 紫色物语

多个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]