# pass-list-as-argument-to-a-function

## Pass List as Argument to a Function

> You can send any data types of argument to a function (string, number, list, dictionary etc.), and it will be treated as the same data type inside the function.

## Example

```python
def some_function(food):
    for x in food:
        print(x)


fruits = ["Apple", "Banana", "Papaya"]
some_function(fruits)
```

***Source:*** [***W3Schools***](https://www.w3schools.com/python/gloss_python_function_passing_list.asp)


---

# 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://til.devjugal.com/python/pass-list-as-argument-to-a-function.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.
