def remove_header(headers, name):
 name = name.lower()
 i = 0
 result = None
 while (i < len(headers)):
  if (headers[i][0].lower() == name):
   result = headers[i][1]
   del headers[i]
   continue
  i += 1
 return result

def remove_header ( headers , name ) : name = name . lower ( ) i = 0 result = None while ( i < len ( headers ) ) : if ( headers [ i ] [ 0 ] . lower ( ) == name ) : result = headers [ i ] [ 1 ] del headers [ i ] continue i += 1 return result
removes the named header from the list of headers .