Random decomposition of list of elements in Python