import os base_path = r's:\Source\Android\DaydreamClock\app\src\main\res\drawable' names = [f'num_{i}' for i in range(10)] + ['num_colon'] xml_content = """ """ for name in names: file_path = os.path.join(base_path, f"{name}.xml") with open(file_path, 'w') as f: f.write(xml_content.replace("num_placeholder", name)) print(f"Created {file_path}")