def rgen():
    sequences = [seq1, seq2, seq3, seq4]
random.shuffle(sequences)
for i in range(24):
    random.shuffle(sequences)
if sequences[:1] != block_list[-1:]:
    block_list.extend(sequences[:])
else:
    block_list.extend(sequences[::-1])
return block_list
extending the element to a list that was used in .pop