python ifPublished by onesixx on 16-05-1816-05-18 https://wikidocs.net/2864 if 조건 : 블럭에 대한 표현은 { } 기호 대신, “들여쓰기”로 표현함. Python >>> price=10000 >>> if price >= 10000: ... print ("onesixx"); ... print ("indentation") ... onesixx indentation if 조건 : A else B Python >> price=10000 >>> if price > 10000: ... print("위") ... else: ... print("아래") ... 아래 if 조건 : A elif 조건 : B elif 조건 : C Python >>> price=11000 >>> if price >= 10000: ... print("위") ... elif price >=5000 and price < 10000: ... print("중간") ... elif price < 5000: ... print("아래") ... 위 Categories: Python Basic onesixx Blog Owner Subscribe Notify of new follow-up comments new replies to my comments Label {} [+] Name* Email Δ Label {} [+] Name* Email Δ 0 Comments Inline Feedbacks View all comments