This problem is in Contest(s) below:
Contest 1036:Python-第4章-字符串
Contest 1039:Python程序设计大赛热身练习
Contest 1073:Python初中级-APTIV-C-字符串
Contest 1061:2023-WE 百题大战01:入门,顺序结构(整型)