combining python lists in savetxt <p>I have 2 python lists that I want to save side by side using np.savetxt().</p> <p>I have tried:</p> <pre><code>np.savetxt('./filename.txt',np.hstack([list1,list2]),fmt=['%f','%f']) </code></pre> <p>but I get the error message</p> <pre><code>raise AttributeError('fmt has wrong shape. %s' % str(fmt)) AttributeError: fmt has wrong shape. ['%f', '%f'] </code></pre> <p>I don't know if it is relevant, but the lists are in decimal.Decimal format.</p> <p>What am I doing wrong please?</p> <hr> <p>edit: I originally said "vstack" but I meant "hstack".</p>