python print 技巧
时间: 2023-09-21 14:10:25 浏览: 133
Python中有一些print函数的技巧,可以让我们更加灵活地输出内容。下面是一些常用的技巧:
1. 使用end参数:通过设置end参数,我们可以控制print函数输出之后是否换行。例如,设置end='*'时,print()输出不换行,以*结尾。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Python Print和end技巧分享](https://blog.csdn.net/weixin_46880697/article/details/128079508)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [python print 技巧](https://blog.csdn.net/xiaoma_bk/article/details/118608159)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文