python怎么改变文本格式,如正文中的这样文本,,转换为text=[["L
python怎么改变文本格式,如正文中的这样文本,,转换为text=[["L
转换为
text=[["Lenard",61],["ken",47],["Steven",25]]num=20for i in text: k,y=map(str,i) print k+'-'*(num-len(k)-len(y))+y
d = [['Lenard', 61], ['ken', 47], ['Steven', 25]]for i,j in d: print('{0:-<30}{1}'.format(i,j))
out:
Lenard------------------------61ken---------------------------47Steven------------------------25
编橙之家文章,
相关内容
- Python CSV模块新建添加模式操作怎么弄,pythoncsv,fil = o
- Mac自带Python如何恢复,误删除了,macpython,把 Library/Py
- urllib2.urlopen()打开mp3链接报error: [Errno 10054],,请教各位
- Python VLfeat图像库找不到python接口,vlfeat图像库,vlfeat这
- Python pyquery和beautifulsoup哪款使用者多,,之前使用过be
- 参考核心编程的函数装饰器报错'NoneType' object is not ca
- 下面这段python代码中fahr未定义是何含义,pythonfahr,cel
- Python Requests库上传文件中文文件名处理方法是什么,
- Web方向学习有哪些好书籍推荐,Web方向学习书籍,有没有
- Python RSA公钥加密结果不同求解,pythonrsa,首先使用rsa生
评论关闭