# Format Method

## Format method

```python
sentence = "The sum of 5 + 10 is {0}".format(50)
```

* This will replace `{0}` with the value provided in the `format` method
* You can pass multiple args as well:

```python
sentence = "The sum of {0} + {0} is {0}".format(50)
# Since all the data is {0} it means that it will take only the first arg from the format function

sentence = "The sum of {0} + {1} is {2}".format(50, 10, 60)
# Here each arg will be taken accordingly and it will do:
# 50 + 10 = 60
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arkannis.net/programming/courses/python-pcap-31-03-course/overview-and-introduction/format-method.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
