Advertisement
Guest User

Untitled

a guest
May 25th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. a = "Sentence with weird whitespaces"
  2.  
  3. 'Sentence with weird whitespaces'
  4.  
  5. ' '.join([x for x in a.split(' ') if len(x)>0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement