Skip to content

Instantly share code, notes, and snippets.

@wynnzen
Created May 5, 2014 02:26
Show Gist options
  • Save wynnzen/10c585a86c18bd39c644 to your computer and use it in GitHub Desktop.
Save wynnzen/10c585a86c18bd39c644 to your computer and use it in GitHub Desktop.
字符串转换成数字
import string
a="12345"
string.atoi(a) #转整型
b="123.678"
string.atof(b) #转浮点数
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment