Solve problem "Series - 2" online - Learn Python 3 - Snakify

Series - 2


Statement

Given two integers A and B. Print all numbers from A to B inclusively, in ascending order, if A < B, or in descending order, if A ≥ B.
Advertising by Google, may be based on your interests

In all the problems input the data using input() and print the result using print().

# Read an integer:
# a = int(input())
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Input:
1
10
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Saved solutions

Tests

InputCorrect answer
1
10
1 2 3 4 5 6 7 8 9 10
10
1
10 9 8 7 6 5 4 3 2 1
179
179
179
-14
7
-14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
12
-5
12 11 10 9 8 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5
-3
-7
-3 -4 -5 -6 -7