Initialize list with range
Initializes a list containing the numbers in the specified range where start and end are inclusive with their common difference step.
- Use
list()andrange()to generate a list of the appropriate length, filled with the desired values in the given range. - Omit
startto use the default value of0. - Omit
stepto use the default value of1.