 <p>Your problem is in this line:</p> <p><code>for i in user_list: i.write(user_list, '\n')</code></p> <p>Change it to this:</p> <pre><code>for i in user_list: wr.write(i, '\n') </code></pre> <p><strong>EDIT:</strong> And remove <code>user_list</code> parameter from all of your functions because it is a global variable and you can access it from within your any function. This may also be a reason why your list not getting saved.</p>