在python中for循环结束后想print打印,但不出现提示符是什么问题??
>>> 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']
点一次回车不出,两次回车就直接出结果了 shell就是这样,想要写长代码,最好新建py,单独run。 那我再试试谢谢
页:
[1]