Let’ see how to use AND operator to combine two basic conditional expressions in the boolean expression of the Python elif condition statement.
Example elif Statement with AND Operator in Python
Simple python example code.
mark = 50 if mark < 40: print('Failed') elif 40 < mark < 80 and mark < 90: print('A+') elif 80 < mark < 101: print('A++')
Note: IDE: PyCharm 2021.3.3 (Community Edition)
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.