C
C
citywey2021-11-13 23:19:51
Python
citywey, 2021-11-13 23:19:51

How to add 0 in front of a number in python?

I have the number 10 in the change, the output should be 0.10, is it possible to do this? And How?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2021-11-13
@citywey

Easy:

a = 10
print(f'0,{a}')
# 0,10

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question