try: a = int(input("Введіть число a: ")) b = int(input("Введіть число b: ")) if a < b: numbers = [i for i in range(a, b+1)] print(*numbers) print(len(numbers)) else: print("Error ocured: A>B") except Exception as err: print("Error ocured:", err)