Python v3 using idle with Tkinter and Gui, repeating code
<p>I am having some trouble with my code and was wondering if anyone could help me?</p>

<p>I have made a program with two classes that ae designed to act as a phone ordering system. This is based on the company Subway. 
You can see the gui this code produces here:
<a href="http://i.stack.imgur.com/dvkYL.png" rel="nofollow">Output</a></p>

<p>I have also uploaded the python file, which contains all the code.
My question is, can I get the button on line 176 "Save and order another sub", to be pressed so the user can add 5 more subs, while being able to save variables for the costs, so they can all be added up at the end. So essentially repeating the code 5 times while holding 5 variables for costs to be added at the end.</p>

<p>Sorry this is so broad, but I hope this makes sense when you can see what my code is trying to do. What code can I put on line 318 that will help me with this?</p>

<p>Here is the code: <a href="https://drive.google.com/file/d/0BydTFZ" rel="nofollow">https://drive.google.com/file/d/0BydTFZ</a> ... sp=sharing</p>

<p>If someone could reply with the code I need to repeat my program with, I would be very grateful.</p>

<p>Firstly, you should directly post the relevant code, not links.</p>

<p>Just based on what you wrote, you can have the button add data to a list instead of an arbitrary number of distinct variables. That way, the list can hold any number of sandwich orders.</p>

<pre><code>mylist = []
mylist.append('chicken sub')
mylist.append('vegetarian sub')
sub1 = mylist[0] # sub1 == 'chicken sub'
</code></pre>

python tkinter