Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ordered_shuffle(*args):
- z = list(zip(*(a.items() if isinstance(a, dict) else a for a in args)))
- random.shuffle(z)
- return [cls(e) for cls, e in zip(map(type, args), zip(*z))]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement