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:
4
output:
l
def indexing():
# Complete this function
word = input('')
index = int(input())
return(word[index])
indexing()
chocolate
2
Out[20]:
'o'
google
4
Out[21]:
'l'
Comments
Leave a comment