> For the complete documentation index, see [llms.txt](https://nmdkims-organization.gitbook.io/python-hand-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nmdkims-organization.gitbook.io/python-hand-book/day1./1.-numbers-strings-lists-dictionaries/boolean.md).

# 불(boolean)

기본 데이터 중 불리안으로 구성된 것에 대한 예제 입니다.

{% hint style="info" %}
**불리안**

```
참과 거짓, True와 False를 나타내는 자료형입니다.
```

{% endhint %}

```python
a = True
b = False

# <class 'bool'>
print(type(a))
print(type(b))

# 조건문의 리턴값으로도 사용됩니다.
print(10 == 10) # True
print(10 > 1) # True
print(10 < 1) # False
```

아래는 자료형의 True, False 표현입니다

| 값          | True or False |
| ---------- | ------------- |
| "python"   | True          |
| ""         | False         |
| \[1, 2, 3] | True          |
| \[]        | False         |
| (1, 2, 3)  | True          |
| ()         | False         |
| {'a': 1}   | True          |
| {}         | False         |
| 1          | True          |
| 0          | False         |
| None       | False         |

위의 True, False 표현을 이용해 아래에 설명할 조건문에서 유용하게 사용됩니다.

값이 들어있냐 안들어있냐를 판단할때 사용됩니다.
