How can I get atom to show true/false when running a condition


Sorry if this is an easy one but I did some Googling before I posted this.

I just started programming and I am using Atom as a text editor/IDE for Python (might not be the best idea but that’s a separate discussion).

I wrote a couple simple statements, and when I run them, they work, great, no errors. But, I want Python to tell me if the condition is true or false.

For example, this is what I expect to see

a = [1, 2, 3]
b = a
b is a

b == a

b = a[:]
b is a

b == a

However, True/false never appears. It just works or doesn’t work, but it always works, regardless of whether true or false is met.


Is it possible that what I am asking is simply an impossibility? Perhaps, I need to write “if b =a, print(b)”


If you want to see how an expression evaluates, just write print(a == b).


Thanks, that’s simple. I thought each one would evaluate without the need to enter print, guess I was wrong


They do evaluate, but you don’t want to receive messages about every if in your program unless you’re running a test suite. print() says, “Evaluate this expression and direct the results toward the user.”


@liveod: What you ask looks like an exercise / practice.
Would you not want to do those in the terminal instead?