我的代码如下所示:
def main():
def say_words1():
print("Welcome to Madame Maxine's Fortune Palace.")
` print("Here, we gaze deeply into your soul and find the")
print("secrets that only destiny has heretofore known!")
print(" ")
print("The power of my inner eye clouds my ability to keep")
print("track of mundane things like the date."),
say_words1()
def get_today(the_date):
the_date=input("Tell me, what day of the month is it today: ")
get_today("the_date")
main()
输出如下:
Welcome to Madame Maxine's Fortune Palace.
Here, we gaze deeply into your soul and find the
secrets that only destiny has heretofore known!
The power of my inner eye clouds my ability to keep
track of mundane things like the date.
Tell me, what day of the month is it today: 5
我如何摆脱......跟踪之间的界限?告诉我......? 我使用的是python 3.6
答案 0 :(得分:0)
不确定问题是否是那个,但我无法使用以下代码重现额外不需要的换行符:
def main():
def say_words1():
print("Welcome to Madame Maxine's Fortune Palace.")
print("Here, we gaze deeply into your soul and find the")
print("secrets that only destiny has heretofore known!\n")
print("The power of my inner eye clouds my ability to keep")
print("track of mundane things like the date.")
def get_today():
the_date = input("Tell me, what day of the month is it today: ")
say_words1()
get_today()
main()
希望它有所帮助 ----评论后编辑: 由于你仍然有问题,你可以尝试插入字符串'\ 033 [1A',在最后一句后跳一行,为
print("track of mundane things like the date. \033[1A")
这不是一个好的解决方案,因为在我的系统中上面的代码没有重现问题,因此解决方法会产生问题。