Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add a dot in a long number in python

num = 10000 // Your number
str_num = str(num)
output = ''
count = 1
for i in str_num[::-1]:
    if count % 3 == 0:
        output = output + i + '.'
        count = 0
    else:
        output = output + i
    count += 1
return output[::-1]
 
PREVIOUS NEXT
Tagged: #add #dot #long #number #python
ADD COMMENT
Topic
Name
3+4 =