missing_buckets = [x in timebuckets if ((x not in found_tenors) and (x == '1y' or x[-1] != 'y'))]
語法錯誤我得到的錯誤:的Python:在列表理解語句
missing_buckets = [x in timebuckets if ((x not in found_tenors) and (x == '1y' or x[-1] != 'y'))]
^
SyntaxError: invalid syntax
哪裏錯誤? – kindall
克拉不是錯誤。 – geoffspear
我認爲你複製粘貼python語句兩次,而不是錯誤。 – Milimetric