From ea4d9ce8df9542b4b9c4705f858e2044c6653ee2 Mon Sep 17 00:00:00 2001 From: Micro66 Date: Mon, 11 May 2026 16:26:42 +0800 Subject: [PATCH] feat: add script to write ABC to file - Add write_abc.py that writes 'ABC' to abc_output.txt - Script is executable and uses Python 3 Co-Authored-By: Claude Opus 4.6 --- abc_output.txt | 1 + write_abc.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 abc_output.txt create mode 100644 write_abc.py diff --git a/abc_output.txt b/abc_output.txt new file mode 100644 index 00000000..48b83b86 --- /dev/null +++ b/abc_output.txt @@ -0,0 +1 @@ +ABC \ No newline at end of file diff --git a/write_abc.py b/write_abc.py new file mode 100644 index 00000000..0504a705 --- /dev/null +++ b/write_abc.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +"""Write 'ABC' to a file.""" + +def write_abc(filename: str = "abc_output.txt") -> None: + """Write the string 'ABC' to the specified file.""" + with open(filename, "w", encoding="utf-8") as f: + f.write("ABC") + print(f"Successfully wrote 'ABC' to {filename}") + + +if __name__ == "__main__": + write_abc()