title: How can I add hypen?
body: <p>I need correct code for the following function immediately.</p>
  <p>def <strong>init</strong>(self, name, area_code, number, is_active): constructor of a telephone line:
  create/initialize instance variables for name, area_code, number and is_active (default value is
  True). Assume area_code is a three-digit integer with no leading 0/1; assume number is a
  seven-digit integer with no leading 0/1.
   <strong>str</strong>: create/return a string as in this example: &quot;703-993-1530 (GMU)&quot;</p>
  <p>My code is</p>
  <pre><code>class Phone(): 
      def __init__(self, name, area_code, number, is_active=True):
          self.name = name
          self.area_code = area_code
          self.number = number
          number = '%s-%s' % (self.number[:3], self.number[3:8])
          self.is_active = is_active
      def __str__(self):
          return str(self.area_code) + &quot;-&quot; + str(self.number) + ' ' + &quot;(&quot; + self.name + &quot;)&quot;
      def __repr__(self):
          return  self.name + ','+ str(self.area_code) + ',' + str(self.number)   
      def __eq__(self, other):
          return self.area_code == other.area_code and self.number == other.number
      def activate(self):
          self.is_active = True
      def deactivate(self):
          self.is_active = False
  </code></pre>
  <p>I just need to add hypen in the phone number which I'm not getting plzzzz help someone</p>