0

Hey while using index() in python, for example:

fruits = "apple"
x = fruits.index("p")

print(x)

The output will be: 1

But there is 'p' in 2nd position also. So I want to get both 1 and 2 separately. How can I?

Jnanesh
  • 1
  • 1
  • 1

0 Answers0