python代码
class Solution:
# s 源字符串
def replaceSpace(self, s):
# write code here
re = ""
for st in s:
if st == " ":
re += "%20"
else:
re += st
return re
python代码
class Solution:
# s 源字符串
def replaceSpace(self, s):
# write code here
re = ""
for st in s:
if st == " ":
re += "%20"
else:
re += st
return re