2019年7月5日

python 实用小技巧

摘要: 1. 列表 #以下三式等价 c = (a>b and a or b) c = a if a>b else b c = [b, a][a>b] 字符串拼接 ' + '.join('%s,%s'%(a,b) for a,b in zip(list('abc'), range(3))) 'a,0 + b, 阅读全文

posted @ 2019-07-05 15:51 iUpoint 阅读(334) 评论(0) 推荐(0) 编辑

导航