builtin_function_or_method' object has no attribute shuffle
from random import shuffle
def shuffle_list(l):
def shuffle_list(l):
shuffle(l)
return l
Import shuffle directly and return l
and don't save it into any variable because l1 = shuffle(l)
will return None
I know this is coming late.
Replace all instances of random.shuffle()
with shuffle()
after changing the import random
with from random import shuffle
.