in windows calculator the digits get seperated in thousands as you type in the number , how can it be done in python ? thanks
fonzali 0 Light Poster
Recommended Answers
Jump to PostDo you already have some code for the calculator ? Are you using a GUI toolkit ?
Jump to PostYou need a GUI to do that, for example a tkinter Entry widget plus supporting code to handle each key stroke and mouse event sent to this widget.
Jump to PostYes, you can enter the commas explicitely and parse the input later. For example you can remove every comma before converting to float or int
userdata = input('please enter the amount of the check ') userdata = userdata.replace(',', '') amount = int(userdata)
You can improve this …
All 10 Replies
Gribouillis 1,391 Programming Explorer Team Colleague
fonzali 0 Light Poster
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
snippsat 661 Master Poster
fonzali 0 Light Poster
fonzali 0 Light Poster
Gribouillis 1,391 Programming Explorer Team Colleague
fonzali 0 Light Poster
Gribouillis 1,391 Programming Explorer Team Colleague
fonzali 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.