-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Shagru edited this page Apr 8, 2015
·
2 revisions
Welcome to the note wiki!
This is the wiki for notebook pages.
#via a simple regex:
def parseInt(sin):
import re
m = re.search(r'^(\d+)[.,]?\d*?', str(sin))
return int(m.groups()[-1]) if m and not callable(sin) else None