Booleans In Python

Booleans are operators that assign a True or False value to a logic. Booleans are never used alone but instead they are used with logical operators to check if a condition is True of False . In Python true is represented as ‘True’ and false as ‘ False’ .

print(3>1)  print(2<1)  my_value = True  print(my_value)

output:
True  False  True
'None' type in Python

'None' assignment is really useful in Python . It is not possible to create a variable that has no value assigned to it. However if you want a variable to exist without a value assigned to it than you must assign 'None' value to it. Note that if a variable is not assigned a value than Python will throw error.

b =
# next line of code
b = None
#next line of code