Python tweeks

There is a native function for shuffle, it works much faster.