> For the complete documentation index, see [llms.txt](https://dinoin.gitbook.io/shi-py-bu-shi-pi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dinoin.gitbook.io/shi-py-bu-shi-pi/suite-cheng-shi-ma-qu-kuai.md).

# suite(程式碼區塊)

用於表示一組語句或代碼塊，通常描述在某個控制結構或代碼塊中執行的一組語句。

比如下面各代碼塊：

{% code title="條件語句（if）" %}

```python
if condition:
    # suite===
    statement1
    statement2
    # ===
```

{% endcode %}

{% code title="循環語句（for、while）" %}

```python
for item in iterable:
    # suite===
    statement1
    statement2
    # ===
```

{% endcode %}

{% code title="函數定義區塊" %}

```python
def func_name:
    # suite===
    statement1
    statement2
    # ===
```

{% endcode %}

{% code title="類定義區塊" %}

```python
class class_name:
    # suite===
    
    def __init__(self):
        # 構造函数的suite
        statement1
        statement2
        # ...

    def my_method(self):
        # 方法的suite
        statement1
        statement2
        # ...

    # ===
```

{% endcode %}
