def export_ebk(symbols, filename='sloth.ebk'):
    """Export symbols in ebk format."""
    res = [b'']
    for symbol in symbols:
        code, exchange = symbol.split('.')
        if exchange == 'SH':
            res.append(f'1{code}'.encode())
        else:
            res.append(f'0{code}'.encode())
    with open(filename, 'wb') as fout:
        fout.write(b'\r\n'.join(res))
