This problem is in Contest(s) below:
Contest 1058:Python-第5章-组合数据类型-2024
Contest 1057:Python-第4章-字符串-2024