from pathlib import Path def main(args): for target in args: path = Path(target) if path.exists(): print(f'"{target}" already exists.') continue path.write_text("") # Pure creation