re.compile('\s+', flags = re.UNICODE)
The above code gives the following warning in python3.
SyntaxWarning: invalid escape sequence \s
I fix it by using r'\s+'. Is it a correct way to fix the problem?
Yes, that is. You can either use a raw string r'\s+' or alternatively escape the backslash with '\\s+'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With