Using the range and len functions