Question:
There is a random number, let's say 100403
. It is necessary to remove all zeros from it, that is, get 143
.
Answer:
I think replace
will suit you.
q = str(100403)
w = int(q.replace('0', ''))
There is a random number, let's say 100403
. It is necessary to remove all zeros from it, that is, get 143
.
I think replace
will suit you.
q = str(100403)
w = int(q.replace('0', ''))