Credit card case study in python