Question #305617

def indexing(arg_1, arg_2):

# Complete this function


word = input()

index = int(input())

# Call the indexing function


how to complete this code to get desired output by using above code


input:

chocolate

2


output:

o


input:

google

4

output:

l


Expert's answer

def indexing():
    # Complete this function
    word = input('')
    index = int(input())
    return(word[index])
indexing()
chocolate
2
Out[20]:
'o'

google
4




Out[21]:

'l'
LATEST TUTORIALS
APPROVED BY CLIENTS