From df690257aa17597b1acb95da1c9af39ec8d7659a Mon Sep 17 00:00:00 2001 From: 2509165003 <2509165003@student.edu.cn> Date: Tue, 21 Apr 2026 11:28:06 +0800 Subject: [PATCH] 4.21 --- 4.21.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 4.21.py diff --git a/4.21.py b/4.21.py new file mode 100644 index 0000000..6b1e69a --- /dev/null +++ b/4.21.py @@ -0,0 +1,6 @@ +text = "hello" +for char in text: + print(f"'{char}'的ASCII码是:{ord(char)}") + +character_A = chr(65) +print(character_A) \ No newline at end of file