- if
Conditionals: if
examples/basics/if.py
def main(): expected_answer = "42" inp = input('What is the answer? ') if inp == expected_answer: print("Welcome to the cabal!") print("Still here") print("This always happens") main()
def main(): expected_answer = "42" inp = input('What is the answer? ') if inp == expected_answer: print("Welcome to the cabal!") print("Still here") print("This always happens") main()