title: CS50 credit.py attempting to add the sum of an string by converting to integer
body: <p>Would someone please point me in the right direction regarding my sum1 variable?</p>
  <p>I'm trying to store the values of the doubled nums from the variable doubled.
  To me it looks like im performing the same operations I used to get the double variable, but that's clearly not working out when i try to print for debugging. This is my first foray into python.
  For card ive been entering: 1234567890987
  I understand the error, but I don't know how to fix it. I'd appreciate any feedback or pointers
  Thank you for your time and effort</p>
  <pre><code>from cs50 import get_int, get_string
  
  
   def main():
   # get an integer from the user to ensure only int imputs
     card = get_int(&quot;Card: &quot;)
   # convert the card into a string so it may be indexed to manipulate individual digits
     card = str(card)
  
   # check len to make sure its the correct amount of numbers that would be in a major credit card.
      if len(card) &lt; 13 or len(card) &gt; 16:
          print(&quot;invalid len&quot;)
          exit(1)
  
  
  # iterate over every other number in the card starting with the second to last digit
  
      for i in range(len(card)-2, 0, -2):
          doubled = (int(card[i]) *2)
          
          #add the string values together
          sum1 = sum(int(doubled))
          print(sum1)
  main()
  </code></pre>
  <p>The terminal reads:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/home/ubuntu/pset6/credit/credit.py&quot;, line 22, in &lt;module&gt;
      main()
    File &quot;/home/ubuntu/pset6/credit/credit.py&quot;, line 20, in main
      sum1 = sum(int(doubled))
  TypeError: 'int' object is not iterable
  </code></pre>