Question: In this code I wanna to replace all blank space to (_) What can I do to run the code replace.py inport os, re dur
replace.py inport os, re dur os.listdir(-/Desktop/treeoplasnid) 2:-/Desktop/treeoplasmid os.chdte C-/esktop/treopLasnld') pyton: connand not found for file in dir: if file.endswith(".faa"): print(file) oftte-open(file, 'r) rftlesofile.read) regexare.comptle( rfileare.sub(+,rfite) rfitearegex.subrfile) wfttesopen(file, wfile.write(rfile) file.close Y12:-/Desktop/treeoplasmids python replace n file replace': [Errno 2] No such file or directo AS-GB13Y12-/Desktop/treeoptasntds python replace.py place.py", ine 5 if file.endswith(".txt Tndentstlontrror: expected an tndented block 12: /Desktop/treeoplasntds python replace.py e replace.py", line s if file.endswith(".txt) expected an tndented block 12:-/Desktop/treeoplasntds python reptace.py epiace.py", ine 5 if file.endswith(".faa"): expected an tndented block 121-/Desktop/treeoplasnts python replace.py place.py", line 5 if file.endswith(".faa"): Indentsttontrrors expected an indented block 2:/Desktop/treeoplasntds
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
