博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
每天CookBook之Python-036
阅读量:4616 次
发布时间:2019-06-09

本文共 1240 字,大约阅读时间需要 4 分钟。

  • 按照固定宽度格式化文本段落
s = "Look into my eyes, look into my eyes, the eyes, the eyes, \the eyes, not around the eyes, don't look around the eyes, \look into my eyes, you're under."print(s)import textwrapprint(textwrap.fill(s, 70))print(textwrap.fill(s, 40))print(textwrap.fill(s, 40, initial_indent='          '))print(textwrap.fill(s, 40, subsequent_indent='          '))import osprint(os.get_terminal_size().columns)
Look into my eyes, look into my eyes, the eyes, the eyes, the eyes, not around the eyes, don't look around the eyes, look into my eyes, you're under.Look into my eyes, look into my eyes, the eyes, the eyes, the eyes,not around the eyes, don't look around the eyes, look into my eyes,you're under.Look into my eyes, look into my eyes,the eyes, the eyes, the eyes, not aroundthe eyes, don't look around the eyes,look into my eyes, you're under.          Look into my eyes, look intomy eyes, the eyes, the eyes, the eyes,not around the eyes, don't look aroundthe eyes, look into my eyes, you'reunder.Look into my eyes, look into my eyes,          the eyes, the eyes, the eyes,          not around the eyes, don't          look around the eyes, look          into my eyes, you're unde

转载于:https://www.cnblogs.com/4thing/p/5674948.html

你可能感兴趣的文章
2014年10月9日——语言基础2
查看>>
mysql查
查看>>
[正则表达式]难点和误区
查看>>
217. Contains Duplicate
查看>>
hadoop遇到问题总结
查看>>
Windows下手动安装redis服务
查看>>
把 MongoDB 当成是纯内存数据库来使用(Redis 风格)
查看>>
PyTorch 1.0 中文官方教程:使用ONNX将模型从PyTorch传输到Caffe2和移动端
查看>>
LeetCode 4Sum
查看>>
哈夫曼树
查看>>
JS计算日期差
查看>>
2017最新高清仿驴妈妈旅行网大数据分析项目实战演练培训视频 228课
查看>>
数据结构综合性实验:多种功能的平衡二叉排序树
查看>>
[九度OJ]1011.最大连续子序列
查看>>
羊车门(作业)
查看>>
对C#中的Close()和Dispose()的浅显理解
查看>>
【手记】小心在where中使用NEWID()的大坑
查看>>
创建添加表格
查看>>
Javascript触屏手势库-JTouch
查看>>
Ext.Net学习笔记14:Ext.Net GridPanel Grouping用法
查看>>