how to use or in an if statement python code example

Example 1: python if statement

usrinput = input(">> ")
if usrinput == "Hello":
  print("Hi")
elif usrinput == "Bye":
  print("Bye")
else:
  print("Okay...?")

Example 2: python if and

if foo == 'abc' and bar == 'bac' or zoo == '123':
  # do something

Example 3: if statement python

a = 11
b = 46

if a < b:
    print('a is less than b')
else:
 	print('a is greater than b')

Example 4: if statement in python

#Conditionals statements in python
#'=' conditionals statements
a = 123
b = 123

if(a==b):
  print('True')
  
#<, > conditionals statements

a = 2
b = 45

if(a<b):
  print('A is smaller than B')