From 75013adb209b7b8484ac48d6595fb70659258261 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Wed, 30 Nov 2022 17:29:32 +0000 Subject: [PATCH] Test bool value conv. --- main.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index eb664c5..2c8e510 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,17 @@ -#String tests -a = " !{} {}! " -b = " !{1} {0}! " -c = "hello" -d = "world" -print(a.format(c, d)) -print(b.format(c, d)) -print(b.format(d, c, a)) +#Bool tests +print(bool(None)) +print(bool("abc")) +print(bool(1)) +print(bool(0)) +print(int(False)) +print(int(True)) +x = "" +print(bool(x)) +x = None +print(bool(x)) +x = 0j +print(bool(x)) +def dummy(): + pass +print(dummy) +print(dummy())