Solution: Python Essentials

Let’s look at the solution to the challenge related to Python essentials.

Function that uses range()

For this task, write a function in Python that doesn’t accept any parameters and returns a list of squares of 1 to 5. Use the range() method to get the numbers from 1 to 5.

Get hands-on with 1200+ tech skills courses.