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