Credit card validity check
Welcome to Code Review. A few basic pointers about programming in python:


Go through the code style guide as documented in PEP-8.
Instead of putting comments, make use of docstrings.
Use test framework for writing a few tests, and use asserts instead of print() for checks and validations.




From the PEP-8 rules:


Convert the comment about Luhn's algortihm into a docstring.
Variables and functions are named using snake_case convention.
No unnecessary blank lines are needed. Keep the code clean and concise.




Your main function can be broken further, into get_provider, valid_card_number and the one your already have check_number. It is completely your choice if you want to raise an exception in case of wrong inputs or whether the functions should return falsy values.

Instead of having an approximately 10 line of code inside if-statement, deal with the else clause first, and return early.

While you didn't actually write the check_number code, I'll just put my views about that as well here.

Using a list comprehension, with the help of % 9 (\$ \mod 9 \$), you can make it quite pythonic. You can then have a sum(&lt;list comprehension&gt;) % 10 == 0 as a one-liner.

sum(digit * 2 % 9 if i % 2 else digit for i, digit in enumerate(map(int, cc_number[::-1]))) % 10 == 0