I'm making an odoo10 module, but I need to change a string like
000-000
to
000000
How can I do that?
答案 0 :(得分:0)
print("000-000".replace("-", "")) #Output: "000000"
答案 1 :(得分:-1)
Try this
Oldstr = “000-000”
Newstr = Oldstr.replace(“-”,””)
That should do it. What I did: