Python Programming Training Certification
Flexible Hours
100 Assignments
Instructor Led online Training
50 LMS Access
24X7 Support
100% Skill Level
Enquire Now
Course Overview
Python bool() Function
The python bool() method converts value to boolean (True or False) using the standard truth testing procedure.
Signature
-
- bool([value])
Parameters
It is not mandatory to pass value to bool(). If you do not pass the value, bool() returns False.
In general , bool() takes a single parameter value.
Return
The bool() returns:
- False if the value is omitted or false
- True if the value is true
Python bool() Function Example
- test = []
print(test,’is’,bool(test))test = [0]
print(test,’is’,bool(test))test = 0.0
print(test,’is’,bool(test))test = None
print(test,’is’,bool(test))test = True
print(test,’is’,bool(test))test = ‘Easy string’
print(test,’is’,bool(test))
Output:
- [] is False
[0] is True
0.0 is False
None is False
True is True
Easy string is True
Candidate’s Journey During Our Training Program
Expert’s Advice & Selection of Module
Choosing the right type of module for the training is half the battle & Our Team of experts will help & guide you.
Get Trained
Get Trained & Learn End to End Implementation from our Expert Trainer who are working on the same domain.
Work on Projects
We Do make our student’s work on multiple case studies , scenario based tasks & projects in order to provide real-time exposure to them.
Placements
We have a dedicated placement cell in order to provide placement assistance & relevant interviews to our candididates till selection
Placement Partner