Generate Python code to flatten a two-dimensional list
list1 = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
```python
list1 = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
flat_list = [item for sublist in list1 for item in sublist]
print(flat_list)
```
Complete the following task based on the instruction and optional input provided.### Instruction:
Generate Python code to flatten a two-dimensional list

### Input:
list1 = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

### Output:
```python
list1 = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
flat_list = [item for sublist in list1 for item in sublist]
print(flat_list)
```