How do I replace everything with one? (in a string) In Pythong

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-05-11T19:28:36Z Indexed on 2010/05/11 19:34 UTC
Read the original article Hit count: 128

Filed under:
|

Suppose I have this:

My---sun--is------very-big---.

I want to replace all multiple hyphens with just one hyphen.

© Stack Overflow or respective owner

Related posts about python

Related posts about string