Python list to string
2016-05-05 17:17
435 查看
By using
''.join
list1 = ['1', '2', '3'] str1 = ''.join(list1)Or if the list is of integers, convert the elements before joining them.
list1 = [1, 2, 3] str1 = ''.join(str(e) for e in list1)
L = ['L','O','L']makeitastringdammit = ''.join(map(str, L))
相关文章推荐
- 使用Python往Elasticsearch插入数据
- OCR识别-python版(一)
- Python MySQL 插入后的主键ID
- 利用pyhton 生成PDF文件
- Python +字符串+列表+字典
- Python3使用requests模块显示下载进度
- 在python下配置numpy,scipy
- vim升级7.4(启用python支持+遇到的错误)
- Python 32位 or 64位
- 中文字符乱码问题简单解决 python
- python使用mongo数据库
- UDPClient.py&UDPServer.py——我的第一行Python代码
- mininet python api
- Jupyter(IPython)
- 191. Number of 1 Bits [easy] (Python)
- PyCharm添加Python自定义模板
- 用Python制作简单的爬虫---爬虫基本思想
- 231. Power of Two [easy] (Python)
- python的学习笔记
- Python处理Excel(三):内置数据类型处理Excel数据