python

python - if 조건문 else, elif 기본문법 및 활용

orangecode 2022. 4. 26. 16:08
728x90
if 조건문 기본문법
if False:
    print("cole1")
    print("cole2")
print("cole3")

 

# if 조건문 기본문법
input = 22
real = 11
if input == real: # if 뒤 : 조건
    print("Hello")
else 구문
# else
if input==real:
    print("Hello")
else:
    print("Who are you")

반응형