I have made a for loop in python that will iterate depedent on how many records I have. So in every loop I want to add a new row with that specific record (i) in the table in the html code. So is it possible to do that in Python and do you have any good example code I can learn from?
My loop looks like this below and in every (i) I want to add both html pieces I have added below (one of them is constant same code and the other one will change one value inside of the html code). In the end there should be 10 x html pieces with different values inside the html code. for i in range(10):
<table class="x_text_block" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="word-break: break-word;">
<tbody>
<tr>
<td style="padding-bottom: 15px; padding-left: 10px; padding-right: 10px; padding-top: 15px;">
<div style="font-family: sans-serif;">
<div class="x_txtTinyMce-wrapper" style="font-size: 12px; color: #555; line-height: 1.2; font-family: Arial, Helvetica Neue, Helvetica, sans-serif;">
<p style="margin: 0; font-size: 14px;"><span style="font-size: 18px; color: #808080;">I WANT TO CHANGE THIS VALUE EACH FOR LOOP</span></p>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="">
<tbody>
<tr>
<td class="x_divider_inner" style="font-size: 1px; line-height: 1px; border-top: 1px solid #e1ede5;"><span> </span></td>
</tr>
</tbody>
</table>