Jul-11-2020, 01:32 PM
(Jul-11-2020, 03:06 AM)thewetmosquito Wrote: I want to carry out this process 3 times.
...
What can I add to my pre-existing code that won't break the program when ran?
There isn't a way for you to carry out the process 3 times without making any other changes to your code, but only a few changes would be needed. The simplest thing you could do would be to use a for loop like
for _ in range(3)
to loop through your code that gets user input and adds it to your database list.If you add a for loop that runs lines 17 - 105, AND move the initialization of all your variables except database and months inside the loop, that will *almost* get you what you're looking for. Your database will end up being just one long list, instead of the list of lists you want, so you'll need to add a little additional code to handle that differently to get your desired output.