Q:

Write a Python program to print the index of the character in a string

0

Write a Python program to print the index of the character in a string. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

str1 = "w3resource"
for index, char in enumerate(str1):
    print("Current character", char, "position at", index )

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now