0
我編寫了一個代碼,它正在使用Python3在我的PC上編譯。但在上傳到Codechef服務器時顯示錯誤。請建議,我在Python 3編碼首次不在Python3中編譯的代碼
Traceback (most recent call last):
File "/run-ls7W2DcLmzUs9GNKbLGN/solution.py", line 41, in <module>
l,r,k=map(int,input().split())
File "<string>", line 1
9 23 1
^
SyntaxError: invalid syntax
或實際使用Python 3.x –
@Lattyware - 自然。 – mgilson
如果你正在編寫向後兼容的代碼,我建議以另一種方式來做:'如果sys.version_info> =(3,):raw_input = input',所以你不要混淆Python 2程序員。 – RoadieRich