The Pythonic way to do this? (multiply certain elements in string)
<p>I just want to calculate the product of certain elements (whose index value + 1 is in <strong>N</strong>) of a string.</p>

<p>This works fine:</p>

<pre><code>start = 1
end = 1000000
N = (1, 10, 100, 1000, 10000, 100000, 1000000) 
product = 1

concatenated_numbers_str = ''.join([str(x) for x in range(1, end + 1)])

for n in N:
    product *= int(concatenated_numbers_str[n - 1])
print(product)
</code></pre>

<p>But what is a better way to do this?</p>

<p>Thank you</p>
