def write_2col(filename, data1, data2):
    """Writes data in 2 columns separated by tabs in a "filename" file."""
    f = open(filename, 'w')
    for i, __ in enumerate(data1):
        f.write('\t' + str(data1[i]) + '\t\t' + str(data2[i]) + '\n')
    f.close()
