print function does not show output on sublime text 3 console

倾然丶 夕夏残阳落幕 提交于 2019-12-09 06:12:57

问题


I have started off with Python today and stuck with a weird problem. I am using Python 3.5.1 and Sublime text 3 and have written a basic hello world program.

print('Hello World')

Saved this file with the name python1.py and pressed Ctrl+B to execute it but the only thing that shows up on the console is [Finished in XYZs] which means that the program sucessfully executes but no output shown.

NOTE: I am using Windows 8(If that's important) and Python is installed properly and I can run my programs from CMD with no problems.


回答1:


Solved it,

Press Ctrl+Shift+B after which a list pops up, select python from that list and its done. From next time just pressing Ctrl+B will work.

'Ctrl+Shift+B' Means "Build this code and then RUN it" instead of simply compile it




回答2:


press Shift-Ctrl-B and select python. That happens because the program only checks if your python program is correctly. The next time just pressing Ctrl+B, will work




回答3:


  1. SHIFT-CTRL-B
  2. CTRL-B ( next time onwards)


来源:https://stackoverflow.com/questions/37626397/print-function-does-not-show-output-on-sublime-text-3-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!