def write_records(records, format, f):
 record_struct = Struct(format)
 for r in records:
  f.write(record_struct.pack(*r))

def write_records ( records , format , f ) : record_struct = Struct ( format ) for r in records : f . write ( record_struct . pack ( * r ) )
write a sequence of tuples to a binary file of structures .