From A to B
EasyP3Coding
Return every integer from a up to b, including a but excluding b, in increasing order. If a >= b return an empty array.
Example 1
- Input
- a = 3, b = 7
- Output
- [3,4,5,6]
Example 2
- Input
- a = 1, b = 2
- Output
- [1]
Example 3
- Input
- a = 5, b = 5
- Output
- []
Constraints
- -10^5 <= a, b <= 10^5
Hints
Give it a real attempt first. Run shows which examples fail.
Saved automatically
Run checks the 3 visible tests, Submit all 8. ⌘Enter runs, ⌘⇧Enter submits.