我有一个列表和一个数组。我如何将每个第一行组合在一起? (Python)的
例如
[a,b]
[c,d]
[e,g]
和
[1, a,b]
[2, c,d]
[3, e,g]
并希望他们在一个列表中看起来像:
render() {
return (
<table className="table table-condensed table-hover">
<thead>
<col width="30"/>
<col width="50"/>
<col width="240"/>
<col width="80"/>
<col width="80"/>
<col width="80"/>
<col width="80"/>
<col width="53"/>
<tr>
<th></th>
<th>QTY</th>
<th>Supplier</th>
<th>WETA</th>
<th>CETA</th>
<th>Chase</th>
<th>Tracking</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<col width="30"/>
<col width="50"/>
<col width="240"/>
<col width="80"/>
<col width="80"/>
<col width="80"/>
<col width="80"/>
<col width="53"/>
{this.props.rows.forEach((row) => {
<tr>
<td>{row.id}</td>
</tr>
}
)}
<tr>
<td>A</td>
<td>24</td>
<td>JC Electronics</td>
<td>24/06/2016</td>
<td>26/06/2016</td>
<td>27/06/2016</td>
<td>25/06/2016</td>
<td>S</td>
</tr>
</tbody>
</table>
)
}
全部谢谢!
答案 0 :(得分:3)
[row1 + row2 for row1, row2 in zip(list, array)]