Ai
2 Star 1 Fork 1

望曦开源团队/Python案例合集

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
removeElement.py 329 Bytes
一键复制 编辑 原始数据 按行查看 历史
NineSenz-九练 提交于 2023-05-01 00:00 +08:00 . 判断字符串是否存在子字符串
# 给定一个字符串,然后移除指定位置的字符
test_str = "wangxios"
# 输出原始字符串
print ("原始字符串为 : " + test_str)
# 移除第三个字符 n
new_str = ""
for i in range(0, len(test_str)):
if i != 2:
new_str = new_str + test_str[i]
print ("字符串移除后为 : " + new_str)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/wangxios/workspace_Python.git
git@gitee.com:wangxios/workspace_Python.git
wangxios
workspace_Python
Python案例合集
master

搜索帮助