将字符串转换'321_1'为'321.1'.
我想创建一个方法将下划线转换为句号.我使用拆分,但它无法工作..任何人都可以帮助我?或者我必须使用while循环
将下划线转换为fullstop
def Convert_toFullStop(text):
x1 = ""
words = text.split()
if words in ("_"):
words = "."
print words
Run Code Online (Sandbox Code Playgroud)