擅长:python、mysql、java
<pre><code>#At this point it is not clear to me if this exec is needed.
exec("vals = [('message-type', 3), ('param_req_list', b'\x01y\x01\x01\x011\aaa_,.'), ('max_dhcp_size', 1500), ('client_id', b'\x01(\aaa\aa1A\aa1O'), ('requested_addr', '192.168.1.4'), ('server_id', '192.168.1.1'), ('hostname', b'HOSTNAME')]")
ans = []
for v in vals:
if v[0] in ['message-type', 'hostname', 'requested_addr']:
ans += (v,)
print (ans)
</code></pre>