直接上代码吧,语法细节一个,但是笔试可能用到 >>> def test(): i = 1 return i=2 SyntaxError: invalid syntax 原因是python 中赋值语句没有返回值,这里不是C++