Writing great functions in Python

if emi_1<emi_2:
print(“option 1 has lowest emi”)
else:
print(“option 2 has lowest emi”)
it gives error like:
TypeError Traceback (most recent call last)
/tmp/ipykernel_36/3820858430.py in
----> 1 if emi_1<emi_2:
2 print(“option 1 has lowest emi”)
3 else:
4 print(“option 2 has lowest emi”)

TypeError: ‘<’ not supported between instances of ‘NoneType’ and ‘NoneType’

Check what are your values in emi_1 and emi_1

actually functions are assigned to these variables.

If functions are assigned to these values, then you can’t compare them with a comparison operator.