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 | 31 |
Tags
- access modifier
- 내부클래스
- down casting
- generic programming
- identityHashCode
- Stream
- public static final
- 엔드포인트
- extends
- 스트림
- shebang
- Inbound
- dbeaver
- 셔뱅
- 깊은 복사
- constructor
- arraycopy
- 자바
- singletone
- pycharm
- Java
- node.js
- Wrapper class
- 얕은 복사
- finalize
- parameter group
- Up Casting
- has-a
- 파이참
- lambda
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()