def shuffle(self, x, random=None, int=int): \"\"\"x, random=random.random -> shuffle list x in place; return None. Optional arg random is a 0-argument fu
Convert an iterable to a list may have a cost. Instead, to get the the first item, you can use:
next(iter(keys))
Or, if you want to iterate over all items, you can use:
items = iter(keys) while True: try: item = next(items) except StopIteration as e: pass # finish