0
What are trailing and leading whitespace? And how can we get rid of them?
I have found the data whitespaces in Python. I want to see some examples of these whitespace to correctly identify and the way to get rid of them.
1 Réponse
0
Use functions (methods for string):
strip()
lstrip()
rstrip()
(naming is obvious, I guess)
for more sophisticated stuff, you need regex.