TypeError in python 3.x ('int' object is not subscriptable)
<pre><code>GTIN0 = int(GTIN[0])
</code></pre>

<p>brings up the error</p>

<pre><code>TypeError: 'int' object is not subscriptable
</code></pre>

<p>can someone explain to me why this happens, can you use simple terms as I'm not too experienced at coding so I'm not "in" with the code terms</p>

<p>It looks like GTIN is an integer rather than a list or tuple, so the interpreter is trying to tell you that you can't take element 0 of an integer because it's not a container type.</p>

<p>How did <code>GTIN</code> acquire its value, and why do you think it should be subscriptable?</p>

python python-3.x typeerror