- 1

Code that read a number between 1000 and 999999 from the user and print it with a comma separating the thousands .

Here is a simple dialog , the user input is 23456 : Enter a integer between 1000 and 999999 : 23456 Output : 23,456

20th Sep 2019, 12:12 PM
Parveen Kumar
Parveen Kumar - avatar
2 ответов
+ 2
def place_value(number):     return ("{:,}".format(number))    print(place_value(input()))
20th Sep 2019, 12:39 PM
KfirWe
KfirWe - avatar