📅  最后修改于: 2022-03-11 14:47:11.984000             🧑  作者: Mango
s = 'one two one two one'
print(s.replace(' ', '-'))
# Output -
# one-two-one-two-one
s = 'one two one two one'
print(s.replace(' ', ''))
# Output -
# onetwoonetwoone