human
Python: use regular expression to remove the white space from all lines
assistant
Here is some code to remove white spaces from all the lines using a regular expression in string 'a\n b\n c'

re.sub('(?m)^\\s+', '', 'a\n b\n c')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.