gpt4 book ai didi

python - 撇号的语法错误

转载 作者:行者123 更新时间:2023-12-02 11:15:19 25 4
gpt4 key购买 nike

“您回答了:”末尾的撇号正在注册为语法错误,不确定是为什么,因为它只是结束字符串。
我不知道该怎么办

print('You got the following questions wrong:'
'Question' , incorrectnum[i] , incorrect_Q[i]
'You answered:' , incorrect_A[i]
'The correct answer was:' , correct_answers[int(incorrectnum[i])])

最佳答案

您缺少print()函数的参数中的逗号。您可以使用以下内容:

print('You got the following questions wrong:',
'Question' , incorrectnum[i] , incorrect_Q[i],
'You answered:' , incorrect_A[i],
'The correct answer was:', correct_answers[int(incorrectnum[i])])

关于python - 撇号的语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49916374/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com