我正在尝试在 python 中使用下面的 HTML 代码创建一个表格,它适用于大多数情况,但在某些情况下,表格会像下面这样混乱,请查看屏幕截图..任何关于错误的输入?如何调试它?任何解决方法来解决它?真的很感激任何投入
混乱行的 HTML 源代码:http: //pastie.org/8263837
...........
...........
GerritMailBody = GerritMailBody + "<td>" + GerritInfo['TargetName'].rstrip('\n') + "</td>"
GerritMailBody = GerritMailBody + "<td>" + GerritInfo['Assignee'].rstrip('\n') + "</td>"
usernames.append(GerritInfo['Assignee'].rstrip('\n'))
#Below is the block that is getting messed up
GerritMailBody = GerritMailBody + "<td height=\"150\%\">"
GerritMailBody = GerritMailBody + "<table>"
for item in GerritInfo['GerritUrl']:
GerritMailBody = GerritMailBody + "<tr>"
GerritMailBody = GerritMailBody + "<td>"
GerritMailBody = GerritMailBody + item.rstrip('\n/') + "<br>"
GerritMailBody = GerritMailBody + "</td>"
GerritMailBody = GerritMailBody + "</tr>"
GerritMailBody = GerritMailBody + "</table>"
GerritMailBody = GerritMailBody + "</td>"
............
............