请以json格式回答如何在python中读取文件并输出其内容。
user
```json
{
  "步骤": [
    {
      "描述": "指定文件路径",
      "代码": "file_path = 'example.txt'"
    },
    {
      "描述": "打开文件",
      "代码": "with open(file_path, 'r') as file:"
    },
    {
      "描述": "读取并输出文件内容",
      "代码": "content = file.read()\nprint(content)"
    }
  ]
}
```
assistant