string in range is not working
<p>I'm new to Python. I'm struggling with range. I'm not good at explaining this problem but I will show you a problem.</p>

<p>Here my code:</p>

<pre><code>my_hanes = ['Blue', 'Red', 'Grey', 'Black']
my_hanes_len = len(my_hanes)
for h in range(0, my_hanes_len):
   print(my_hanes_len[h])
</code></pre>

<p>Every time, the message pop up and said "'int' object is not subscriptable"</p>

<p>How do you solve this problem?</p>

<p>Thank you!</p>

<p>You need <code>print(my_hanes[h])</code> instead of <code>print(my_hanes_len[h])</code>.</p>

python int range