#Using the bool() Function

print(bool(1))
print(bool("Python"))

print(bool(0))
print(bool([]))

The bool() function is used to convert any value to a Boolean value (True or False). It returns False if called without any argument or the given argument has a boolean value of False, otherwise it returns True. In other words, it converts any given non-Boolean value to a Boolean value.

bool(obj)
obj The object whose boolean value should be evaluated.

The function returns the boolean value( True or False) of the specified object.

In a nutshell the boolean value of the data types can be summarized as:

non-zero number e.g 1,  -7,  20.0 True
Zero e.g 0,  0.0, 0j False
non-empty String  True
empty string False

nonempty sequence e.g (0, 1, 2),  [1, 2, 3], {"a": "apple "}

True
empty sequence e.g (), [], {} False
any other instance of Python type except Nonetype e.g class, function, types

True 

None False

Examples:

bool()
//False
bool(0)
//False
bool("")
//False
bool([])
//False
bool(1)
//True
bool("Hello")
//True
bool([1, 2, 3])
//True