# How do I merge two dictionaries in a single expression in Python?

To merge two dictionaries in a single expression you can use the dictionary unpacking operator `**`. This creates a new dictionary and unpacks all key-value pairs into the new dictionary. Let’s look at the example below.

```python
x = {'firstname': 'John'}
y = {'lastname': 'Doe'}

z = {**x,**y}
```

This will create a new dictionary z with the value of `{'firstname': 'John', 'lastname': 'Doe'}`. 

## Using OR operator

If you are using **python 3.9.0 or greater**, you can also use the bitwise OR operator also known as a pipe operator.

```python
z = x | y
```

The result will be the same.