blob: 8893e21dcbc0cf1daaba0720335818dab1a5de58 [file] [log] [blame]
assert_eq(list(range(5)), [0, 1, 2, 3, 4])
assert_eq(list(range(0)), [])
assert_eq(list(range(1)), [0])
assert_eq(list(range(-2)), [])
assert_eq(list(range(-3, 2)), [-3, -2, -1, 0, 1])
assert_eq(list(range(3, 2)), [])
assert_eq(list(range(3, 3)), [])
assert_eq(list(range(3, 4)), [3])
assert_eq(list(range(3, 5)), [3, 4])
assert_eq(list(range(-3, 5, 2)), [-3, -1, 1, 3])
assert_eq(list(range(-3, 6, 2)), [-3, -1, 1, 3, 5])
assert_eq(list(range(5, 0, -1)), [5, 4, 3, 2, 1])
assert_eq(list(range(5, 0, -10)), [5])
assert_eq(list(range(0, -3, -2)), [0, -2])
---
range(2, 3, 0) ### step cannot be 0