1# Test true-ish value handling 2 3if not False: 4 print("False") 5 6if not None: 7 print("None") 8 9if not 0: 10 print("0") 11 12if not "": 13 print("Empty string") 14if "foo": 15 print("Non-empty string") 16 17if not (): 18 print("Empty tuple") 19if ("",): 20 print("Non-empty tuple") 21 22if not []: 23 print("Empty list") 24if [0]: 25 print("Non-empty list") 26 27if not {}: 28 print("Empty dict") 29if {0:0}: 30 print("Non-empty dict") 31