Last active
December 16, 2019 00:51
-
-
Save ShaneTsui/4075bad4e32daf74f48dd62d2e3e8c26 to your computer and use it in GitHub Desktop.
[Pythonic] #python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get the most common letter | |
| text = text.lower() | |
| return max(string.ascii_lowercase, key=text.count) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 1. 取字母 | |
| import string | |
| string.ascii_lowercase | |
| string.ascii_uppercase | |
| string.ascii_letters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment