摘要: python中有三个内建函数:列表,元组和字符串,他们之间的互相转换使用三个函数,str(),tuple()和list(),具体示例如下所示: 列表和元组转换为字符串则必须依靠join函数 >>> "".join(tuple(s)) 'xxxxx' >>> "".join(list(s)) 'xxx 阅读全文
posted @ 2016-01-28 09:47 LCX测试小姐姐 阅读(733) 评论(0) 推荐(0) 编辑