Is there a way/plug-in to enable output without “print()” in SublimeText?
For example,
JavaScript
x
3
1
a = 1 + 2
2
print (a)
3
Output:
JavaScript
1
2
1
3
2
Wanted:
JavaScript
1
3
1
a = 1 + 2
2
a
3
Output:
JavaScript
1
2
1
3
2
P.s. I also tried below:
Advertisement
Answer
I am pretty sure that the answer is no. You can rename the print function to make it less noticable like this:
JavaScript
1
6
1
_ = print
2
3
a = 2
4
5
_(a)
6
Output is 2
Alternatively:
As a few people mentioned in the comments, what you are likely looking for is a repl
, which you can get by simply running python
command directly in your terminal.
like this:
JavaScript
1
2
1
$ python
2
that should take you to an interactive environment that gives you real time results for the python code you input. Below is an example…
JavaScript
1
11
11
1
>>> a = 1 + 2
2
>>> a
3
3
4
>>> a + 25
5
28
6
>>> a
7
3
8
>>> a = a + 25
9
>>> a
10
28
11