码迷,mamicode.com
首页 > 其他好文 > 详细

一句话双重循环拼接字符串

时间:2018-10-07 21:29:53      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:nbsp   color   style   \n   循环   字符   for   records   col   

\n.join( .join(cols[i] + : + str(a[i]) for i in range(len(cols)-1)) for a in rows) + \n + str(len(rows)) +  records found!\n

 

一句话双重循环拼接字符串

标签:nbsp   color   style   \n   循环   字符   for   records   col   

原文地址:https://www.cnblogs.com/zhenfei/p/9751453.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!