Here's my take on this problem.
I have defined a function 'index' which takes the number and the input index and outputs the digit at the desired index.
The enumerate method operates on the strings, therefore the number is first converted to a string. Since the indexing in Python starts from zero, but the desired functionality requires it to start with 1, therefore a 1 is placed in the enumerate function to indicate the start of the counter.
def index(number, i):
for p,num in enumerate(str(number),1):
if p == i:
print(num)