title: Python strip hyphen from block of string
body: <p>I want to strip hyphen from block of string:
  e.g:</p>
  
  <pre><code>"(CB)-year-(3F)-year-
  (56)-ADDR(01)-DATA(06)-(00)-ADDR5-PBX-CHX-[address0]-(CA)-new-
  (56)-ADDR(01)-DATA(03)-(00)-ADDR5-PBX-CHX-[address0]-(CA)-new-
  (05)-ADDR5-[address0]-(E0)-tWHR2-nintK-
  (56)-ADDR(01)-DATA(05)-(00)-ADDR5-PBX-CHX-[address0]-(CA)-new-"
  </code></pre>
  
  <p>This is how my string looks like. Need a generic method to remove <code>-</code> from end of every line.</p>
  
  <blockquote>
    <p>Note: This is one complete string copied from excel</p>
  </blockquote>
  
  <p>I have tried the following:</p>
  
  <pre><code> if data.endswith('-'):
          data=seq[:-1]
  </code></pre>
  
  
  
  <pre><code>data.strip("\r\n")
  </code></pre>
  
  <p>This is how i want my output/Result to look like:</p>
  
  <pre><code>(CB)-year-(3F)-year
  (56)-ADDR(01)-DATA(06)-(00)-ADDR5-PBX-CHX-[address0]-(CA)-new
  (56)-ADDR(01)-DATA(03)-(00)-ADDR5-PBX-CHX-[address0]-(CA)-new
  (05)-ADDR5-[address0]-(E0)-tWHR2-nintK
  (56)-ADDR(01)-DATA(05)-(00)-ADDR5-PBX-CHX-[address0]-(CA)-new
  </code></pre>