data = conn.recv(2048)
// send the next vehicle
conn.send(str(entered_vehicles[0]))
del entered_vehicles[0]
// send a negative response
send_message(conn, in_format="i", values=(1,))
After Change
if len(entered_vehicles) == 0:
output = "-1"
else:
output = ":".join([str(e) for e in entered_vehicles])
send_message(conn, in_format="str", values=(output,))
entered_vehicles = []