operator1 [Python] if / for / while / operator [Python] if / for / while / operator if 문 이용하기 1. 조건부로 특정 블럭을 수행 하고자 할 때 사용 2. 들여쓰기로 특정 블럭을 구성한다. 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354# 단일 if문 if True: print "ok 1" print "ok 2" if False: print "ok 1" print "ok 2" isWait=True # 조건부 수행if isWait: print "wait!" print "wait!" print "wait!" # 양자 택일num=10 if num%2==0 : print u"{} 은 짝수 입니다... 2017. 8. 10. 이전 1 다음