【发布时间】:2016-09-12 18:46:03
【问题描述】:
我在替换“?”时遇到问题零。 ogtL 只是我从 excel 文件中获取的数字列表。从那个 excel 中获得的只是更多的数字。我只是对它为什么不工作有疑问,我还希望在将新字符串放回 ogtL 方面得到一些帮助。
for eachWord in ogtL: #ogtL is a List
newString=""
for eachCharacter in eachWord:
newString+=eachCharacter
newString.replace("?","0")
print(newString)
【问题讨论】:
-
你得到的输出是什么?
标签: python string list replace