Test bool value conv.

This commit is contained in:
Captain ALM 2022-11-30 17:29:32 +00:00
parent 399ddc8ffd
commit 75013adb20
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1

25
main.py
View File

@ -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())