摘要: 现有一个列表:list=["h","e","l","l","o"]需要将列表里的所有元素合并为一个字符串 “hello”,Python没有内置函数可以将列表的所有元素连接起来,类似于String的join函数。可以采用另一种方法 importitertools >>>s="".join(itert... 阅读全文
posted @ 2015-07-27 13:51 YasselBing 阅读(3973) 评论(0) 推荐(0) 编辑