第17580题
以下统计2023年10岁学生数的Python身份证切片代码中,①处不能选的是?

列表stud存储每位学生的身份证号码,如stud = ['110726201205261117','120718201209011101']。

def cj(xs):
    c = 0
    for s in xs:
        age = int(   ①   )
        if 2023 - age == 10:
            c += 1
    return c
print(cj(stud))
A

s[6:10]

B

s[6:-8]

C

s[-12:-8]

D

s[-12:11]

提交0次 正确率0.00%
答案解析