# maketrans, translate `maketrans` 換產生出對應的 dictionary。 ```python >>> trans = str.maketrans('0123456789', '0123456789') >>> trans {65296: 48, 65297: 49, 65298: 50, 65299: 51, 65300: 52, 65301: 53, 65302: 54, 65303: 55, 65304: 56, 65305: 57} ``` 就可以依照這個 dictionary 做轉換。 ```python >>> '123站著穿'.translate(trans) '123站著穿' ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up