x = "Welco'me to Java2'blog"
y = ""
for i in x:
if(i not in "'"):
y = y + i
print(y)
输出为:Welcome to Java2blog
单引号已删除
x = "Welco'me to Java2'blog"
y = ""
for i in x:
if(i not in "'"):
y = y + i
print(y)
输出为:Welcome to Java2blog
单引号已删除