- 创建多行字符串的方式
prompt = ‘this is the first row’
prompt += ‘/nthis is the second row.’ - 退出循环
立即退出while循环,不再运行循环中余下的代码,用break;
返回到循环开头,并根据条件测试结果决定是否继续执行循环,用continue.
《Python编程从入门到实践》笔记(第七章.用户输入和while循环)
猜你喜欢
转载自blog.csdn.net/qq_38122800/article/details/104104467
今日推荐
周排行