blob: 45282edb478783bad534994d7c1a402fbbf23be9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
x = "003407"
num = []
on = 0
for c in list(x):
if c == "0":
if on:
num.append(c)
else:
continue
else:
on = 1
num.append(c)
print("Input:", x)
print("Output:",''.join(num))
|