def double_char(s): s2 = '' for i in s: i += i s2 += i return s2
*replace()函数
*tanslate()-str.maketrans(oldstr, newstr, delstr)