Cum de a adăuga un singur spațiu într-un șir în python
Exemple de cod
0
0
adăugare spațiu înainte și după șir 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 ) !
0
0
cum de a adăuga spațiu în python
x = 10
y = x * 0.62
z = y * 2.14
print(str(x) + " " + str(y) + " " + str(z))