小编Bay*_*ohu的帖子

为什么我的打印功能会打印()和""以及声明?

这是我的绝对初学者Python编程挑战的代码

    food = input("What is your favorite entree? ")

    dessert = input("What is your favorite dessert? ")

    print("\nI am going to assume that your favorite meal is" , food +   dessert)
Run Code Online (Sandbox Code Playgroud)

而不是打印

I am going to assume that your favorite meal is
Run Code Online (Sandbox Code Playgroud)

这是印刷

('\nI am going to assume that your favorite meal is', 'steakcookies')
Run Code Online (Sandbox Code Playgroud)

我需要改变什么?

python printing function python-2.7

1
推荐指数
1
解决办法
1068
查看次数

标签 统计

function ×1

printing ×1

python ×1

python-2.7 ×1