鱼C论坛

 找回密码
 立即注册
查看: 1699|回复: 2

[已解决]在python中for循环结束后想print打印,但不出现提示符是什么问题??

[复制链接]
发表于 2020-11-29 10:16:45 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
>>> magicians = ['alice','davis','carolina']
>>> for magician in magicians:
        print(f"{magician.title()},that was a greak trick!")
        print(f"I can't wait to see you next trick,{magician.title()}.\n")
就是这
       
Alice,that was a greak trick!
I can't wait to see you next trick,Alice.

Davis,that was a greak trick!
I can't wait to see you next trick,Davis.

Carolina,that was a greak trick!
I can't wait to see you next trick,Carolina.

>>> print("Thank you, everyone.That was great magic show!")
Thank you, everyone.That was great magic show!
>>> magicians = ['alice','davis','carolina']
最佳答案
2020-11-29 10:19:47
再打一次回车
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2020-11-29 10:19:47 | 显示全部楼层    本楼为最佳答案   
再打一次回车
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-11-29 10:28:08 | 显示全部楼层

打了一次不出,打两次就直接出循环结果了
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-1-10 21:13

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表