random.shuffle

random.shuffle(random.shuffle(foo))

Python: TypeError: object of type 'NoneType' has no len()

TypeError: object of type 'NoneType' has no len()

This function returns None and that's why you have the error.

这个函数返回None所以这就是为啥你会报错的原因。

你可能感兴趣的:(random.shuffle)