python check if string contains only digits