鱼C论坛

 找回密码
 立即注册
12
返回列表 发新帖
楼主: 冬雪雪冬

[技术交流] Python:每日一题85(答题领鱼币)

[复制链接]
发表于 2021-3-25 10:47:34 | 显示全部楼层
    def func(string):
        check = 'aeiouAEIOU'
        for i in range(len(string)):
            if string[i] in check and i == len(string)-1:
                return string.upper()
            elif string[i] in check and string[i+1] not in check:
                return string[:i+1].lower()+string[i+1].upper()+string[i+2:].lower()
        else:
            return string[0].lower()+string[1:].upper()
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-4-7 17:57:51 From FishC Mobile | 显示全部楼层
看看
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-1 10:43

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表