I am interested in asking the user to continue the code execution.
If he enters 'Y', it should make the code to run again from the start. Otherwise for 'N' it should stop.
I think, it will start with something like this:
m=input('Do you want to continue, Y/N [Y]:','s')
No products are associated with this question.
Set the infinite loop. I did not check if this code runs, but the idea is this:
%%your code here
m=input('Do you want to continue, Y/N [Y]:','s') if m=='N' break end
Also, to avoid check up for extra cases from user input I would use function 'menu' instead of 'input':
%%your code here choice = menu('Press yes no','Yes','No'); if choice==2 | choice==0 break; end