# -*- coding: UTF-8 -*-
quicksort = lambda l: quicksort([i for i in l[1:] if i < l[0]]) + [l[0]] + quicksort([j for j in l[1:] if j >= l[0]]) if l else []
## but readability counts
# def quicksort(l):
# if not l: return []
# pivot = l.pop()
# less = [i for i in l if i < pivot]
# greater = [j for j in l if j >= pivot]
# return quicksort(less) + [pivot] + quicksort(greater)
def run():
from random import randint
l = [randint(0, 50) for i in range(10)]
print(l)
print(quicksort(l))
if __name__ == "__main__":
run()