<span class="value">
like, I am doing string substitution:<br><br><br>if &nbsp;x = 2243:<br>&nbsp; &nbsp; string = string + &quot;e&quot;<br>if &nbsp;x = 2234:<br>&nbsp; &nbsp;string = string + &quot;p&quot;<br><br>and so forth.<br><br><br>how do I create this:<br><br><br>
list = [<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (2342,p)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (4234,e)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and so forth, <br><br><br>&nbsp; &nbsp; &nbsp; &nbsp;]<br><br><br><br>so I can use it like this:<br><br>for a in range(10):<br>&nbsp; &nbsp; If x = list[a][0]:<br>&nbsp; &nbsp; &nbsp; &nbsp; string = string + list[a][1]
<br><br><br>?</span>