" Life is short, you need python "除去两端的空白字符,查找其中的python,将其替换为python3。
s = " Life is short, you need python " s = s.strip().replace('python','python3') print(s)