Codewars notes- 双字符 字符串

def double_char(s):
    s2 = ''
    for i in s:
        i += i
        s2 += i
    return s2

 

*replace()函数

*tanslate()-str.maketrans(oldstr, newstr, delstr)

posted @ 2022-06-27 15:01  大序列  阅读(24)  评论(0编辑  收藏  举报