Jan-01-2019, 09:42 PM
(This post was last modified: Jan-01-2019, 09:43 PM by ichabod801.)
That may work, but it's rather inefficient. I would use
If you just change line 3 to return a value, you are not assigning the return value to anything on line 7. Change line 3 to return a value, and change lines 5 to 10 to:
redacted_num = 'xxxx xxxx xxxx {}'.format(card_string[-4:])
.If you just change line 3 to return a value, you are not assigning the return value to anything on line 7. Change line 3 to return a value, and change lines 5 to 10 to:
if __name__ == '__main__': card_string = str(input("Enter your fake credit card number: ")) redacted_num = ccredact(card_string) print(redacted_num)
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures