def clean_opcode(opcode_list):
    """
    Clean opcode in a opcode list. Drop PUSH-like, DUP-like and SWAP-like opcodes, then replace all LOG-like opcodes with LOG.

    input: list of strings
    output: list of strings
    """
    cleaned_opcode_list = []
    for opcode in opcode_list:
        if ('PUSH' not in opcode and 'DUP' not in opcode and 'SWAP' not in
            opcode):
            if 'LOG' in opcode:
                cleaned_opcode_list.append(opcode.replace('LOG0', 'LOG').
                    replace('LOG1', 'LOG').replace('LOG2', 'LOG').replace(
                    'LOG3', 'LOG').replace('LOG4', 'LOG'))
            else:
                cleaned_opcode_list.append(opcode)
    return cleaned_opcode_list
