Skip to content

Instantly share code, notes, and snippets.

@MagneticMule
Last active November 10, 2015 23:50
Show Gist options
  • Save MagneticMule/8916dd7db8dc28ae85c3 to your computer and use it in GitHub Desktop.
Save MagneticMule/8916dd7db8dc28ae85c3 to your computer and use it in GitHub Desktop.
def is_number(s):
"""Test if the passed string contains a number @ position 0"""
try:
float(s)
return True
except ValueError:
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment