Step 3 work with numbers and strings Luhn Algorithm

            def main(card_translation):
                card_number = '4111-1111-4555-1142'
            str.maketrans({'-':   '',    ' ':  '' } )

Can’t figure this code out!

Welcome to the forum @Gnome61

Firstly, fix up the indentation of the second and third lines of code.
They both should be four spaces each.

Then assign the variable mentioned in the instructions to your expression.

Happy coding

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.