Python or Keyword
A logical operator that returns True
if either side of the "or" are
True
.
Example
Python
Copy Code
name = 'Joe' if (name == 'Joe' or name == 'Marc'): print('Name is Joe or Marc')
Output
Name is Joe or Marc
A logical operator that returns True
if either side of the "or" are
True
.
name = 'Joe' if (name == 'Joe' or name == 'Marc'): print('Name is Joe or Marc')
Name is Joe or Marc