Ai
1 Star 3 Fork 5

刘炜/python LeetCode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
1381URL化.py 235 Bytes
一键复制 编辑 原始数据 按行查看 历史
刘炜 提交于 2020-03-08 11:27 +08:00 . 单次遍历
class Solution:
def replaceSpaces(self, S: str, length: int) -> str:
s = ''
for i in range(length):
if S[i] == ' ':
s += '%20'
else:
s += S[i]
return s
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/new_way/python-LeetCode.git
git@gitee.com:new_way/python-LeetCode.git
new_way
python-LeetCode
python LeetCode
master

搜索帮助