> For the complete documentation index, see [llms.txt](https://bangshinchul.gitbook.io/amazon-q/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bangshinchul.gitbook.io/amazon-q/amazon-q-developer/undefined/undefined-3.md).

# 여러 줄 주석

Amazon Q Developer는 사용자의 의도를 이해하고 여러 줄의 주석을 기반으로 제안을 제공합니다.

***

## 예시 #1

### 문자열과 숫자

#### 일반적인 프롬프트

```bash
Given a list that contains some numbers and strings, 
format the list elements into a string in which the numbers are prepended with a "#" 
and check for strings and wrap in a double quote.
```

#### Python 프롬프트

`prompt_eng.py` 라는 이름의 파일을 생성하고, 다음의 코드를 작성합니다.

```bash
"""
Given a list that contains some numbers and strings, 
format the list elements into a string in which the numbers are prepended with a "#" 
and check for strings and wrap in a double quote.
"""
```

<details>

<summary>Amazon Q Developer 제안</summary>

```
def format_list(list_of_items):
    return [f'#{item}' if type(item) == int else f'"{item}"' for item in list_of_items]
```

</details>

## 예시 #2

### 함수 테스트

#### 일반적인 프롬프트

```bash
Test the format_list function
```

#### Python 프롬프트

같은 파일에 다음의 코드를 작성합니다.

```bash
# Test the format_list function
```

<details>

<summary>Amazon Q Developer 제안</summary>

```
list_of_items = [1, 2, 3, "Hello", "World", "!"]
print(format_list(list_of_items))
```

</details>
