Paste2
Create Paste
Followup Paste
QR
lucky_nums
=
[]
for
L
in
range
(
1
,
11
):
for
mask
in
range
(
0
,
2
**
L
):
s
=
bin
(
mask
)[
2
:]
.
zfill
(
L
)
s
=
s
.
replace
(
'0'
,
'4'
)
.
replace
(
'1'
,
'7'
)
lucky_nums
.
append
(
int
(
s
))
print
(
lucky_nums
)
Please enable JavaScript to view the
comments powered by Disqus.
Comments powered by
Disqus