<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def update(sc, filename, asset_id):
    '''
    Updates a DNS Asset List with the contents of the filename.  The assumed
    format of the file is 1 entry per line.  This function will convert the
    file contents into an array of entries and then upload that array into
    SecurityCenter.
    '''
    addresses = []
    with open(filename) as hostfile:
        for line in hostfile.readlines():
            addresses.append(line.strip('\n'))
    sc.asset_update(asset_id, dns=addresses)