Python从字符串创建表

Python从字符串创建表,python,Python,可以用Python创建这个表吗?我有bash代码,但它在Python中不起作用 "description":"Patch the following servers for any\\u00a0Windows Updates and Application Updates.\\r\\n\\r\\nSQL Updates or rollups will not be done. All the servers to be put in maintenance mode on Zabbix befo

可以用Python创建这个表吗?我有bash代码,但它在Python中不起作用

"description":"Patch the following servers for any\\u00a0Windows Updates and Application Updates.\\r\\n\\r\\nSQL Updates or rollups will not be done. All the servers to be put in maintenance mode on Zabbix before commencing the maintenance on all the servers.\\u00a0Once the update or maintenance is completed, the table below will be completed to show the status of the updates and added to JIRA comments.\\r\\n\\r\\nPlease review infrastructure for new servers and add to the list.\\r\\n\\r\\n\\u00a0\\r\\n|Server Name|OS Updates Completed|Application Updates Completed (list)|Remarks|\\r\\n|PEL-ACD-01A|\\u00a0Yes/No|\\u00a0Java, Chrome etc|\\u00a0|\\r\\n|PEL-ACD-01B|\\u00a0|\\u00a0|\\u00a0|\\r\\n|PEL-JMP-01A|\\u00a0|\\u00a0|\\u00a0|\\r\\n|PEL-SQL-01A|\\u00a0|\\u00a0|\\u00a0|\\r\\n|PEL-TLS-01A|\\u00a0|\\u00a0|\\u00a0|"
这就是我使用python得到的结果


感谢@Lomtur为我指引了正确的方向,我需要删除两个反斜杠,并且必须在
|
中留出空格才能得到空行

   "description":"Patch the following servers for any Windows Updates and Application Updates.\n \nSQL Updates or rollups will not be done. All the servers to be put in maintenance mode on Zabbix before commencing the maintenance on all the servers.\\u00a0Once the update or maintenance is completed, the table below will be completed to show the status of the updates and added to JIRA comments.\r\n\nPlease review infrastructure for new servers and add to the list.\r\n\r\n\r\n|Server Name|OS Updates Completed|Application Updates Completed (list)|Remarks|\r\n|PEL-ACD-01A|Yes/No|Java, Chrome etc| |\r\n|PEL-ACD-01B| | | |\r\n|PEL-JMP-01A| | | |\r\n|PEL-SQL-01A| | | |\r\n|PEL-TLS-01A| | | |"

模块是否适合您,还是必须是大字符串?必须是大字符串:上面的代码在JIRA中创建问题,表格是JIRA问题描述的一部分。您使用双反斜杠转义unicode字符,如果用单反斜杠替换双反斜杠,看起来有点像表格(print(…)仅带一个反斜杠)。这就是你想要它看起来的样子吗?@Lomtrur,谢谢你的建议,我会把整个代码作为答案发布