type conversion in python - first exercise solution