Python Script For Running A Variable Number Of Scans