#digit index:
s=input()
l=len(s)
for i in range(l):
if(s[i].isnumeric()):
print(i,end="")
#Another method:
def index(a):
res=""
for i in range(len(a)):
if(a[i]>'0' and a[i]<'9'):
res=res+str(i)
return res
r=index(s)
print(r)
No comments:
Post a Comment