content=0 s = input('请输入') for i in range(len(s)): if i%2==1 and s[i].isdigit(): content=content+1 print(content)