Python Keywords (True/False) - Part-II
Try to execute these in your machine.
Output
True and False are the same as 1 and 0. Check the below example.
>>> 1 == 1 True >>> 5 > 3 True >>> 10 <= 1 False >>> 3 > 6 False >>> True or False True >>> True and False False |
Output
True and False are the same as 1 and 0. Check the below example.
>>> True == 1 True >>> False == 0 True >>> True + True 2 >>> False + True 1 >>> False * True 0 >>> |
Comments
Post a Comment