-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Code Author: @kumbikumbiSIC
Knock Number:08
1番大きなfor文必要なくない?
Lines 11 to 26 in 4b38fbb
| for char in sentence: | |
| result = "" | |
| print("変換前: ", end = "") | |
| for char in sentence: | |
| print(char, end = "") | |
| if char.islower(): | |
| #ord()により、ある文字に対応するコードポイント(の10進数表記を得ることができる) | |
| #chr()により、あるコードポイント(の10進数整数)から対応する文字を得ることができる | |
| result = result + chr(219 - ord(char)) | |
| #その他 | |
| else: | |
| result = result + char | |
| print("") #end = "" との対応のため | |
| return result |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels