In what situation this code is used since nothing get printed and no errors | Sololearn: Learn to code for FREE!

+15

In what situation this code is used since nothing get printed and no errors

if not True: print("1")

12/20/2017 8:45:31 AM

Nilavarasan

3 Answers

New Answer

+3

if the whole program consists of those 2 lines, then this code achieves nothing.

+1

It is never printed because "not true" is not "true" in any case.

+1

"not true" is same as false. That can be used in place of false. That not withstanding, you may prefer to use the false statement rather than "not true" since it takes lesser space