入力:-
CRlist
[['CR', 'FA', 'CL', 'TITLE'], ['409452', 'WLAN', '656885', 'Age out RSSI values from buffer in Beacon miss scenario'], ['379104', 'BT', '656928', 'CR379104: BT doesn\xe2\x80\x99t work that Riva neither sends HCI Evt for HID ACL data nor response to HCI_INQUIRY after entering into pseudo sniff subrating mode.']]
HTMLコードを生成するための次のpythongコードがありますが、期待していない出力を生成します.ここで正しいデータを持っているように見える前に配列値を呼び出します.ここ?
for i in range(len(CRlist)):
if i==0:
continue
for j in range(len(CRlist[0])):
print "i"
print i
print "j"
print j
print "CRlist[i][j]"
print CRlist[i][j]//right data here
CRstring += """
<tr>
<td><a href="{CR}">{CR}</a></td>
<td>{FA}</td>
<td>{CL}</td>
<td>{Title}</td>
</tr>""".format(
CR=CRlist[i][j],
FA=CRlist[i][j],
CL=CRlist[i][j],
Title=CRlist[i][j],
)
CRstring += "\n</table>\n"
出力を期待しているが、正しく作成されていない
<tr>
<td><a href="409452">409452</a></td>
<td>WLAN</td>
<td>656885</td>
<td>Age out RSSI values from buffer in Beacon miss scenario</td>
</tr>
..............
行セルデータが冗長であるため、実際の出力
<tr>
<td><a href="409452">409452</a></td>
<td>409452</td>
<td>409452</td>
<td>409452</td>
</tr>
<tr>
<td><a href="WLAN">WLAN</a></td>
<td>WLAN</td>
<td>WLAN</td>
<td>WLAN</td>
</tr>
<tr>
<td><a href="656885">656885</a></td>
<td>656885</td>
<td>656885</td>
<td>656885</td>
</tr>
<tr>
<td><a href="Age out RSSI values from buffer in Beacon miss scenario">Age out RSSI values from buffer in Beacon miss scenario</a></td>
<td>Age out RSSI values from buffer in Beacon miss scenario</td>
<td>Age out RSSI values from buffer in Beacon miss scenario</td>
<td>Age out RSSI values from buffer in Beacon miss scenario</td>
</tr>
<tr>
<td><a href="379104">379104</a></td>
<td>379104</td>
<td>379104</td>
<td>379104</td>
</tr>
<tr>
<td><a href="BT">BT</a></td>
<td>BT</td>
<td>BT</td>
<td>BT</td>
</tr>
<tr>
<td><a href="656928">656928</a></td>
<td>656928</td>
<td>656928</td>
<td>656928</td>
</tr>
<tr>
<td><a href="CR379104: BT doesnΓÇÖt work that Riva neither sends HCI Evt for HID ACL data nor response to HCI_INQUIRY after entering into pseudo sniff subrating mode.">CR379104: BT doesnΓÇÖt work that Riva neither sends HCI Evt for HID ACL data nor response to HCI_INQUIRY after entering into pseudo sniff subrating mode.</a></td>
<td>CR379104: BT doesnΓÇÖt work that Riva neither sends HCI Evt for HID ACL data nor response to HCI_INQUIRY after entering into pseudo sniff subrating mode.</td>
<td>CR379104: BT doesnΓÇÖt work that Riva neither sends HCI Evt for HID ACL data nor response to HCI_INQUIRY after entering into pseudo sniff subrating mode.</td>
<td>CR379104: BT doesnΓÇÖt work that Riva neither sends HCI Evt for HID ACL data nor response to HCI_INQUIRY after entering into pseudo sniff subrating mode.</td>
</tr>
/table>
=========PLlist==========