Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 |
| 30 |
Tags
- Stream
- aice associate
- ai능력시험
- 엔드포인트
- down casting
- Python
- Up Casting
- identityHashCode
- generic programming
- pycharm
- 자바
- 스트림
- 파이썬
- access modifier
- Aice
- 판다스
- 넘파이
- singletone
- parameter group
- 셔뱅
- has-a
- 파이참
- 얕은 복사
- arraycopy
- Inbound
- dbeaver
- pandas
- Java
- public static final
- extends
Archives
- Today
- Total
٩(๑•̀o•́๑)و
Boolean 본문
>>> True
True
>>> False
False
>>> 3 > 1
True
>>> 3 <= 1
False
>>> 3 == 3
True
>>> 3 != 4
True
>>> 'Hello' == 'Hello'
True
>>> 'Hello' == 'hello'
False
>>> 'Hello' != 'hello'
True
>>> x = 1
>>> y = 1.0
>>> x is y
False
>>> x is not y
True
>>> x == y
True
>>> id(x)
4350253760
>>> id(y)
4353630864
>>> True and True
True
>>> True and False
False
>>> False and False
False
>>> True or True
True
>>> True or False
True
>>> False or False
False
>>> not True
False
>>> not False
True
>>> bool(1)
True
>>> bool(10)
True
>>> bool(0) #0, 0.0만 false
False
>>> bool(-1)
True
>>> bool('True')
True
>>> bool('False') #empty string을 제외한 string은 전부 true
True
>>>
# False로 취급되는 것
- None
- False
- 0인 숫자들 : 0, 0.0, 0j
- 비어있는 문자열, 리스트, 튜플, 딕셔너리, 세트 : '', "", [], (), {}, set()