摘要:
exercise: Given a string of digits, you should replace any digit below 5 with '0' and any digit 5 and above with '1'. Return the resulting string. Not 阅读全文
摘要:
def double_char(s): s2 = '' for i in s: i += i s2 += i return s2 *replace()函数 *tanslate()-str.maketrans(oldstr, newstr, delstr) 阅读全文