1usrinput = input(">> ")
2if usrinput == "Hello":
3 print("Hi")
4elif usrinput == "Bye":
5 print("Bye")
6else:
7 print("Okay...?")
8
1answer = input(":")
2if answer == "lol":
3 print("haha")
4else:
5 print("not haha")
6 exit()
7
8please note that the exit() command is optional and is not necessary.
1if (condition1):
2 print('condition1 is True')
3elif (condition2):
4 print('condition2 is True')
5else:
6 print('None of the conditions are True')
1weather == "Good!" or weather == "Great!":
2
3# Or the following
4
5weather in ("Good!", "Great!"):
6