Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Print numbers

Instructions

Given positive integer n implement a function which returns a list representing all numbers from n to 1. If n value is zero then empty list should be returned.

Challenge | Solution

Examples

print_numbers(0) # []

print_numbers(2) # [2, 1]

print_numbers(5) # [5, 4, 3, 2, 1]