문제

I'm newbie to python. As I start coding simple python code using windows Python 3.3.3 Shell, when I try to save webtest1.py, it automatically adds extra line below. While running the code, this automatically causes invalid syntax error.

I check the code online on http://pych.atomidata.com/code, it shows, 'Line: 8 Column: 1 W391 blank line at end of file'.

Any solution? Appreciated.

saving .py file with new line automatic addition error

도움이 되었습니까?

해결책

You need to use brackets around print in python 3. print (htmltext) should solve your problem.

http://docs.python.org/3.3/library/functions.html#print

Edit: @Ashwini already stated that until I wrote this. I think you/he should write that in answers so it can be accepted.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top