a guest Oct 1st, 2019 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def ordered_shuffle(*args):
  2.     z = list(zip(*(a.items() if isinstance(a, dict) else a for a in args)))
  3.     random.shuffle(z)
  4.     return [cls(e) for cls, e in zip(map(type, args), zip(*z))]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand