def count_down_skip(start, skip=0):
"""
Counting down a sequence with a skip value,
from a defined start point in reversed order.
Args:
start: start loop index.
skip: number to skip over.
Returns:
(list): skipped list.
"""
return [num for num in reversed(range(start + 1)) if num != skip]
print("... ".join(map(str, count_down_skip(10,1))) + "!")
this code can output 10 to 0 and without 1 while if 10 to 0 without 1 4 3 (skip these numbers), then how can I do? I tried change the print :
print("... ".join(map(str, count_down_skip(10,1,4,3))) + "!")
but error happened...
define a function for countdown numbers in python