# Functions - lists

{% code title="example.py" %}

```python
def main():
    friends=["Jonathan","Mark","Danell","Joshua","Grant"]
    done = False
    while not done:
        print("Menu")
        print("D - Do Now")
        print("e1 - Example 1")
        print("e2 - Example 2")
        print("e3 - Example 3")
        print("Q - Quit")
        choice = input("Choice: ")
        if choice == "D":
            print("Do Now")
            print(friends)
        elif choice == "e1":
            e1(friends)
        elif choice == "e2":
            e2(friends)
            e1(friends)
        elif choice == "e3":
            e3(friends)
            e1(friends)
        elif choice == "Q":
            print("Exiting Game!")
            done = True
def e1(friends):
    for x in range(len(friends)):
        print(friends[x])
def e2(friends):
    name=input("What's his or her name? ")
    friends.append(name)
def e3(friends):
    e1(friends)
    fdelete=input("Which friend do you want to delete? ")
    friends.remove(fdelete)
main()
```

{% endcode %}


---

# 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://www.pythonclassroom.com/functions/functions-lists.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.
