Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = 'Some part of my text file with irregular spacing.n'
- pattern = ' {2,}'
- subsitution = ???.count(' ')
- re.sub(pattern, substitution, s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement