title: What's the best way to format a phone number in Python?
body: <p>If all I have is a string of 10 or more digits, how can I format this as a phone number?</p>
  
  <p>Some trivial examples:</p>
  
  <pre><code>555-5555
  555-555-5555
  1-800-555-5555
  </code></pre>
  
  <p>I know those aren't the only ways to format them, and it's very likely I'll leave things out if I do it myself. Is there a python library or a standard way of formatting phone numbers?</p>