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
In Python 2 dict.keys() return a list, whereas in Python 3 it returns a generator.
You could only iterate over it's values else you may have to explicitly convert it to a list i.e. pass it to a list function.