簡體   English   中英

Python3中的print函數

[英]print function in Python3

我目前在Eclipse JavaEE Indigo中使用Python3.2。

我使用函數print如下:

input = open('test.txt', 'r')
for line in input:
    print(line, end='')

Eclipse報告語法錯誤

print(line, end = '')

它表明了這一點

Syntax error while detecting tuple.
print Found at: builtins
print(value, ..., sep=' ', end='\n', file=sys.stdout)

但是,該程序運行完美。

有什么我可以做的刪除錯誤符號或有什么更好的解決方案來解決這個問題嗎?

將語法版本更改為Python 3.x.

語法版本

(上圖來自http://pydev.org/manual_101_project_conf2.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM