Python 3.x 如何在shell底部打印而不重新排序代码?(蟒蛇3)

Python 3.x 如何在shell底部打印而不重新排序代码?(蟒蛇3),python-3.x,Python 3.x,我的问题举例如下: food_choice=input("Would you like to eat a burrito or a pizza? ") if food_choice=='burrito': print('You should go to a Mexican restaurant!') if food_choice=='pizza': print('You should go to an Italian restaurant!') print('D

我的问题举例如下:

food_choice=input("Would you like to eat a burrito or a pizza? ")

if food_choice=='burrito':

    print('You should go to a Mexican restaurant!')

if food_choice=='pizza':

    print('You should go to an Italian restaurant!')

    print('Don't forget to save me a slice of pizza!') #<----- How do I print this at the bottom?


print('Everyone loves to eat!')

print('Have a good time at your restaurant!')
food\u choice=input(“你想吃玉米煎饼还是比萨饼?”)
如果食物选择=‘玉米煎饼’:
打印(“你应该去墨西哥餐厅!”)
如果食物选择=='pizza':
打印(“你应该去意大利餐馆!”)

打印(“别忘了给我留一片比萨饼!”)#这里有一个简单的方法来解决这个问题

after = ""
food_choice=input("Would you like to eat a burrito or a pizza? ")
if food_choice=='burrito':
    print('You should go to a Mexican restaurant!')
if food_choice=='pizza':
    print('You should go to an Italian restaurant!')
    after = 'Don't forget to save me a slice of pizza!'

print('Everyone loves to eat!')

print('Have a good time at your restaurant!')
if after:
    print(after)