Answer to Question #305617 in Python for sruthi

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


1
Expert's answer
2022-03-03T17:08:59-0500
def indexing():
    # Complete this function
    word = input('')
    index = int(input())
    return(word[index])
indexing()
chocolate
2
Out[20]:
'o'

google
4




Out[21]:

'l'

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS