파이썬 문법 - if, elif, else

Junyeong Choi·2021년 5월 14일
0

Description

  • Control flow
  • 어떤 조건에 대하여 True일때 실행한다.
  • 만약... 처럼 조건을 걸 수 있다.
  • ex) if, elif, else
if True:
	print('It is true!')
--> It is true!



hungry = False

if hungry:
	print('Feed me!')
else: 
	print('I am not hungry!')
--> I am not hungry!

0개의 댓글