Advertisement
Guest User

Untitled

a guest
Oct 1st, 2019
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  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))]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement