python check if string is integer or float