会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
卡斯柏的博客
笔下虽有千言,胸中实无一策
卡斯柏的博客
笔下虽有千言,胸中实无一策
博客园
首页
新随笔
联系
订阅
管理
2017年5月12日
Python: if else in a list comprehension
摘要: Python's conditional expression is a if C else b and can't be used as: [a for i in items if C else b] The right form is: [a if C else b for i in items
阅读全文
posted @ 2017-05-12 01:15 CasperWin
阅读(512)
评论(0)
推荐(0)
公告