# -*- coding:utf-8 -*-
class Solution:
# s 源字符串
def replaceSpace(self, s):
if type(s) != str:
return
return s.replace(' ','%20')
剑指offer ——替换空格python
最新推荐文章于 2022-10-18 16:30:32 发布
# -*- coding:utf-8 -*-
class Solution:
# s 源字符串
def replaceSpace(self, s):
if type(s) != str:
return
return s.replace(' ','%20')