This problem is in Contest(s) below:
Contest 1035:Python-第3章-流程控制
Contest 1037:Python-第5章-组合数据类型
Contest 1074:Python初中级-APTIV-D-组合数据类型
Contest 1063:2023-WE 百题大战03:分支结构