简体   繁体   中英

Python in Sublime Text 3 won't respond on simple operations

My editor Sublime Text 3 don't respond on code like: 2+2

Here is the case 在此处输入图片说明

Every other code like: print("Hello World") , works perfectly. Is there any solution or I need to change editor?

I just didn't display on console. You can use print(2+2) to print out the result

This is normal behaviour. When running a script file, you have to use print to display any outputs. For example:

x = 2 + 2
print(x)

my editor Sublime Text 3 don't respond on code like: 2+2

If you want this behaviour you need to fire up a python interpreter. Sublime Text 3 does not interpret your code. It just executes your scripts.

If you want to display output, you'll need to print it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM