3-2-1
This commit is contained in:
9
4-21 48.py
Normal file
9
4-21 48.py
Normal file
@@ -0,0 +1,9 @@
|
||||
#题目一
|
||||
word="Hello"
|
||||
print("方式一:字符的ASCII码")
|
||||
for ch in word:
|
||||
print(f"'{ch}'->{ord(ch)}")
|
||||
print("\n方式二:验证chr(65)")
|
||||
print(f"chr(65)='{chr(65)}'")
|
||||
print(f"验证成果:{chr(65)=='A'}")
|
||||
#题目三
|
||||
Reference in New Issue
Block a user