Reputation: 3
My editor Sublime Text 3 don't respond on code like: 2+2
Every other code like: print("Hello World")
, works perfectly. Is there any solution or I need to change editor?
Upvotes: 0
Views: 165
Reputation: 402263
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.
Upvotes: 1
Reputation: 31885
I just didn't display on console. You can use print(2+2)
to print out the result
Upvotes: 2
Reputation: 8633
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)
Upvotes: 1