> For the complete documentation index, see [llms.txt](https://nakamura-shogo.gitbook.io/dev-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nakamura-shogo.gitbook.io/dev-wiki/python/biao-zhun-ji-neng/python_assert.md).

# assert

## 基本構文

* Falseのときに、AssertionErrorの例外となる。
* 以下のように使う。(これは必ずエラーになる例)

```python
assert False, "assert message"
```

* Falseの部分を条件文に変更して使う。
