EN
Python - no-break / non-breaking space in string
3 points
In this article, we would like to show you how to insert no-break / non-breaking space in string in Python.
Quick solution:
xxxxxxxxxx
1
text = "a \u00A0\u00A0\u00A0 b" # U+00A0
2
3
print(text) # a b
Output:
xxxxxxxxxx
1
a b
Unicode code |
Python |
HTML |
HTML |
U+00A0 | \u00A0 or \u00a0 |   or   | |