티스토리 뷰
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
if <조건식>:
<구문>
Value의 값이 5보다 큰경우, 블록의 구문이 수행
>>> value = 10
>>> if value > 5:
print('value is bigger than 5')
value is bigger than 5
2개이상의 조건을 처리할 때
if <조건식1>:
구문 1
elif <조건식2>:
구문 2
else: #어떠한 조건에도 해당되지 않는경우 동작
구문 3
-. 10 이상 20미만의 표현
C & JAVA 계열
a >= 10 and a < 20
Python
10 <= a < 20
구문표현방식 사용, 가독성 용이
'Python' 카테고리의 다른 글
Python,반복문(while,for) (0) | 2016.04.21 |
---|---|
Python, 참/거짓(bool) (0) | 2016.04.21 |
Python, 이터레이터(Iterator) & 제네레이터(Generator) (0) | 2016.04.21 |
Python, help (0) | 2016.04.21 |
Python, Pass (0) | 2016.04.21 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- command
- Linux
- Module
- tkinter
- activebackground
- JPA
- 상수
- FetchType
- indicatoron
- checkbutton
- Composite Key
- 리눅스
- Excel
- Java
- 폼
- ManyToOne
- borderwidth
- Private
- IdClass
- highlightthickness
- tkinter command & bind [명령어묶기와 사건묶기] Python
- apache
- disabledforeground
- fetch join
- Python
- vba
- onetomany
- activeforeground
- 파이썬
- highlightbackground
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함