Python: how to set value to a list element
<p>I have a list, say named <code>mac</code>, which saves 6-bytes mac address. I want to set the last byte to 0, then I use:</p>

<pre><code>mac[5] = 0
</code></pre>

<p>But it gives me error:</p>

<pre><code>TypeError: 'str' object does not support item assignment
</code></pre>

<p>How to fix this error?</p>
