Python bæta pláss til að texta skrá eftir hverju ,
Kóða dæmi
0
0
bæta pláss fyrir og eftir string python
using re adds white-space before and after the desired characters:
import re
pat = re.compile(r"([.()!])")
print (pat.sub(" \\1 ", string))
# hello . . . ( world ) !