#  File:       luhn.py
#  Purpose:    Write a program that can take a number and determine whether
#              or not it is valid per the Luhn formula.
#  Programmer: Amal Shehu
#  Course:     Exercism
#  Date:       Sunday 18 September 2016, 09:55 PM


class Luhn(object):
    def __init__(self, card_number):
        self.card_number = card_number

    def addends(self):
        luhn_function = lambda x: (2 * x - 9) if (x > 4) else (2 * x)
        

@@ -374,24 +374,28 @@
 f):%0A        
+def 
 luhn_functio
@@ -399,20 +399,19 @@
 tion
- = lambda x:
+(x): return
  (2 
@@ -451,9 +451,136 @@
         
+prev_digits = %5Bitem for item in str(self.card_number)%5D%0A%0A        return int(prev_digits)%0A%0Acdn = Luhn(1212)%0Aprint (cdn.addends())
 %0A

Convert card number to string for iteration