title: Inserting a string into a list of integers
body: <p>I am trying to make a script where a '-' is put in between all odd digits in a given number (ie 991453 would be 9-9-145-3), but for some reason python wont allow me to insert a str into a list of integers. The error I keep on getting is 'TypeError: not all arguments converted during string formatting'</p>
  
  <p>My code:</p>
  
  <pre><code>def DashInsert(text):
  
      list_int = map(int, list(text))
  
      for i in xrange(len(list_int)-1):
          if (list_int[i] % 2 == 1) and (list_int[i+1] % 2 == 1):
             print i
             list_int.insert(i+1,'-')
  
      return list_int
  </code></pre>
  
  <p>Here is my actual input and error:</p>
  
  <blockquote>
    <p>999472</p>
  </blockquote>
  
  <p>0</p>
  
  <p>Traceback (most recent call last):</p>
  
  <p>File "DashInsert.py", line 17, in </p>
  
  <pre><code>print DashInsert(string)
  </code></pre>
  
  <p>File "DashInsert.py", line 11, in DashInsert</p>
  
  <pre><code>if (list_int[i] % 2 == 1) and (list_int[i+1] % 2 == 1):
  </code></pre>
  
  <p>TypeError: not all arguments converted during string formatting</p>