python test if string is int or float