How To/python/

# -*- coding: utf-8 -*-
 
"""
string.isdigit(str value) -> boolean
 
[en]
Check if value contains only numbers. It not checks if string
is numeric because 10.00 or -10 returns False!
 
[pl]
Sprawdza czy ciąg value zawiera tylko liczby. Uwaga, nie sprawdza
czy sting jest numeryczny bo przykładowo 10.00 lub -10 zwraca False.
"""
 
print "10".isdigit()
#True
 
print "10.98".isdigit()
#False
 
print "10,90".isdigit()
#False
 
print "10a".isdigit()
#False
 
print "0010".isdigit()
#True
 
print "10 90".isdigit()
#False
 
print "-10".isdigit()
#False