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

def pack_list(fmt, data):
    '''Convert a Python list into a ctypes buffer.

    This appears to be faster than the typical method of creating a ctypes
    array, e.g. (c_float * len(data))(*data)
    '''
    func = struct.Struct(fmt).pack
    return create_string_buffer(''.join([func(x) for x in data]))