Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Array Python Sort custom
SUBMITTED BY:
amonian
DATE:
Jan. 7, 2017, 3:51 a.m.
FORMAT:
Python
SIZE:
282 Bytes
Raw
Download
Tweet
HITS:
1330
Go to comments
Report
Python
Awesome
!!!!!!!!!!!
def
lac_lu
(
array
):
a
=
sorted
(
array
)
for
i
in
range
(
0
,
len
(
a
)):
if
i
%
2
==
0
:
print
a
[
i
]
else
:
print
a
[
len
(
a
)
-
i
]
L
=
[
1
,
2
,
3
,
4
,
5
,
8
,
3
,
2
,
1
,
9
]
lac_lu_2
=
lambda
L
:
sorted
(
L
)
print
lac_lu_2
(
L
)
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus