Python(52)_统计用户输入内容,索引为奇数,并且对于的索引的是数字的个数

#-*-coding:utf-8-*-

'''
统计用户输入内容,索引为奇数,并且对于的索引的是数字的个数
'''
count = 0
content = input(">>>")
for i in  range(len(content)):
    if i%2 == 1 and content[i].isdigit():
        content +=1
print(count)

猜你喜欢

转载自www.cnblogs.com/sunnybowen/p/10230964.html