long time ago I wrote a simple program that adds the amounts of checks and does some analysis on them for my business , it simply asks for the amount of the check and the dates . in Iran due to inflation most of the checks have too many zeros on them and it helps to see them seperated by ',' as we type them in , that was the reason I asked .
I am guessing that you used the built-in float type for this, but given that you are dealing with currency, I would recommend using the decimal module for representing the monetary value instead, to get the best control over the significant decimal places, and applying locale.currency() to format the value as a string. While the links I posted are for the Python 3.4 docs, thhis should apply to Python 2.7 as well.
thank you guys for your suggestions , but what I am looking for is this : suppose my program asks for the amount on the check , as I am typing , I like to see the numbers being seperated in thousands , in other words looking at snippsat code when I am asked for the value in line one , and I enter the number without ',' I want it to appear like line 4 eg:
>>> amount=int(input('please enter the amount of the check '))
please enter the amount of the check 1,000,000,000
thanks Gribouillis , that is what I thought too , but looking at snippsat code I got an idea , I can input the numbers using ',' (do I have to declare them as strings ? ) and then inside my code change them to float or int