← Back to challenges

List of Consecutive Numbers

PythonHardarraysloopslanguage_fundamentals

Instructions

Implement a function that returns a list containing all the consecutive numbers in ascendant order from the given value low up to the given value high (bounds included).

Examples

get_sequence(1, 5) ➞ [1, 2, 3, 4, 5]

get_sequence(98, 100) ➞ [98, 99, 100]

get_sequence(1000, 1000) ➞ [1000]

Notes

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Limit a Number's Value