Dan Bishop wrote:
> Roy Smith wrote:
>>creditCardNumber = myInt ("1234 5678 9012 3456 789")
> 
> Or alternatively, you could write:
> 
> creditCardNumber = int('1234''5678''9012''3456''789')

Or creditCardNumber = int("1234 5678 9012 3456 789".replace(' ',''))

Or make a little function that does the same job and looks cleaner, if 
you need this more than once.

But why would anyone want to create numeric literals for credit card 
numbers?

-Peter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to