题库 Python题库 题目列表 下面的Python代码中,idList变量为list类型,保存有大...
单选题

下面的Python代码中,idList变量为list类型,保存有大量身份编码,倒数第二位如为偶数,则为女性,奇数为男性,从第7位开始连续8位为出生年月日,年为4位数月和日均为两位数。编码统计每天有几位男生生日女生生日。横线处应填入代码是( )。

A.
(1, 0)if gender==1 else(1, 0),(0, 1)
B.
(0,1)if gender==1 else(1,0),(0,0)
C.
0,1 if gender==1 else 1,0 , 0,0
D.
(0,1)if gender==1 else (1,0) ,0,0
题目信息
2024年 3月 选择题
0%
正确率
0
评论
465
点击