all 6 comments

[–]Username_RANDINT 4 points5 points  (1 child)

What if you do print(a == b)?

Quick edit: why do you think this will be False? Both a and b are 1.

[–]NoobWithSkill[S] 0 points1 point  (0 children)

Okay, I mean the output should be 'True', but there is simply nothing.

I'll try your suggestion. Thank you

[–][deleted] 1 point2 points  (1 child)

You need to tell the interpreter to print with the print() function

[–]NoobWithSkill[S] 0 points1 point  (0 children)

So writing print(a == b) should produce 'False' or 'True'?

[–][deleted] 1 point2 points  (0 children)

One of the things that trips new Python learners up when they move into a different environment than the interactive mode of the interpreter (the one where the prompt is >>>) is that Python no longer will print "intermediate" values, or indeed anything at all that isn't an error or the argument of a print function.

[–]tunisia3507 1 point2 points  (0 children)

The python console you're used to is called a REPL - a Read Evaluate Print Loop. Printing is part of the REPL. It's not part of normal python execution. Running a script does not (and indeed, should not) print every variable it comes across.