Here's one solution.
ccno = '4556737586899855'
ccl = []
for n in ccno:
if n == ' ':
continue
ccl.append(int(n))
for i in range(0,16,2):
ccl[i] *= 2
if ccl[i] > 9:
ccl[i] = 1 + (ccl[i] - 10)
checksum = sum(ccl) % 10
if checksum:
print(ccno, 'is not a valid credit card number')
else:
print(ccno, 'is a valid credit card number')