sys.stdin.readline如何结束
时间: 2023-09-09 14:09:17 浏览: 161
sys.stdin.readline()方法在读取标准输入时,会一直等待用户输入直到遇到换行符(\n)为止。所以,要结束sys.stdin.readline()的输入,可以通过输入一个换行符(按下回车键)来实现。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Python 中sys.stdin.readline()的用法](https://blog.csdn.net/DK_Criss/article/details/127110256)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [sys.stdin.readline和readlines以及input()](https://blog.csdn.net/xx_xjm/article/details/124291027)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文