题目:请实现一个函数,把字符串 s 中的每个空格替换成"%20"。 代码: class Solution: def replaceSpace(self, s: str) -> str: tmp='' for i in s: if i==' ':tmp+='%20' else:tmp+=i return tmp