Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import re
  2.  
  3. texto = '\t    OrtizOL Blog   \n  '
  4.  
  5. print(texto.strip())
  6.  
  7. print(texto.lstrip())
  8.  
  9. print(texto.rstrip())
  10.  
  11. print(texto.replace(' ', ''))
  12.  
  13. print(re.sub('\s+', ' ', texto))