---
title: "*args and **kwargs: what do they mean?"  
description: "*args and **kwargs: what do they mean?"  
author: "Anna Weber"  
published: 2026-11-15  
updated: 2026-11-15  
canonical: https://www.mindstick.com/forum/163037/args-and-kwargs-what-do-they-mean  
category: "python"  
tags: ["python", "args kwargs", "functions", "parameters", "unpacking"]  
reading_time: 1 minute  

---

# *args and **kwargs: what do they mean?

What do *args and **kwargs stand for, and when would I use them?

## Replies

### Reply by Sagar Poudel

They let a function accept a variable number of arguments.

- `*args` collects extra positional arguments into a **tuple**.
- `**kwargs` collects extra keyword arguments into a **dict**.

```
def show(*args, **kwargs):
    print(args)    # (1, 2, 3)
    print(kwargs)  # {'color': 'red', 'size': 5}

show(1, 2, 3, color="red", size=5)
```

The names are only a convention. What counts is the single and double star.

The stars also work in the other direction, to unpack when calling:

```
numbers = [1, 2, 3]
print(*numbers)   # same as print(1, 2, 3)
```

Common uses: decorators (pass everything through to the wrapped function), wrapper functions, and APIs that accept optional settings. Do not overuse them. Explicit parameters are easier to read and document.


---

Original Source: https://www.mindstick.com/forum/163037/args-and-kwargs-what-do-they-mean

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
