We want an array, but not just any old array, an array with contents!

Write a function that produces an array with the numbers `0` to `N-1` in it.

For example, the following code will result in an array containing the numbers `0` to `4`:

```
arr(5) // => [0,1,2,3,4]
```

Difficulty: introductory

Starter code:

def arr(n=0):
	

Solutions:
def arr(n=0): 
    return list(range(n))

def arr(n=0): 
    return [i for i in range(n)]

def arr(n=0): 
    return [*range(n)]

def arr(n=0): 
    # [ the numbers 0 to N-1 ]
    aux = []
    for x in range(n):
        aux.append(x)
    return aux


def arr(n=int()): return list(range(int(),n))

arr = lambda n=0: list(range(n))

def arr(n=0): 
    lst = [i for i in range(n)]
    return lst

def arr(n=0): 
    return [ x for x in range(n)] if n>0 else []

def arr(n = ''): 
    # [ the numbers 0 to N-1 ]
    n = str(n)
    if len(n) == 0:
        return []
    n = int(n)
    array = []
    for i in range(n):
        array.append(i)
    return(array)


def arr(n = None):
    
    if n is None:
        return []
        
    result = []
    for i in range(0, n):
        result.append(i)
    return result


    # [ the numbers 0 to N-1 ]


arr = lambda n=0: [i for i in range(n)]

def arr(n=0):    #To handle a call without an argument, e.g. arr(), default arg to 0
    if n==0:
        return []
    else:
        return [i for i in range(n)]
#end function arr


def arr(n = 0):
    arrey = []
    num = 0
    for i in range(n):
        arrey.append(num)
        num+=1
    return arrey


arr=lambda a=0:[*range(a)]

from typing import List, Tuple, Optional

def arr(*args: Optional[Tuple[int]]) -> List[int]:
    """ Get an array with the numbers 0 to N-1 in it. """
    return list(range(0, *args))

arr\
=\
lambda\
n\
=\
0\
:\
[
*
range
(
n
)
]

arr = lambda _=0: [*range(_)]

def arr(n=0):
    arr = list()
    if n>0:
        for i in range(0,n):
            arr.append(i)
    else:
        return []
    return arr

def arr(n=0): 
    if n == None: return []
    if n == 0: return []
    if n == 1: return [0]
    else: return arr(n-1) + [n-1]

def arr(*n):
    try:
        return [*range(n[0])]
    except:
        return []

arr=lambda a=0:list(range(a))

def arr(n=0):
    arrays = []
    for x in range(n):
        arrays.append(x)
    return arrays

def arr(n=0):
    array = []
    for num in range(0, n):
        array.append(num)
    return array

def arr(n=0): 
    # [ the numbers 0 to N-1 ]
    myarray = []
    for i in range(0,n): myarray.append(i)
    
    return myarray

def arr(n = 0):
    count = []
    for i in range(n):
        count.append(i)
    return(count)
        


def arr(n = 0): 
    list = []
    
    if n:
        for x in range(n):
            list.append(x)
    
    return list

def arr(n=0): 
    tmp=[]
    if n>0:
        for j in range(0,n):
            tmp.append(j)
    return(tmp)

def arr(n=0): 
    lst = list(range(n))
    return lst

        


def arr(n = None):
    if n is None:
        return []
    new_arr = []
    for x in range(0,n):
        new_arr.append(x)
    return new_arr




def arr(*n): 
    # [ the numbers 0 to N-1 ]
    if len(n) == 0:
        x = 0
    else:
        x = n[0]
    return list(range(0, x))

def arr(n=None):

    if n == 0 or n == None:
        array = []
    else:
        array = [i for i in range(n)]
    return array

def arr(n=None):
    if n is None:
        return []
    L = []
    for i in range(n):
        L.append(i)
    return L

def arr(n = 0): 
    i = 0
    tab = []
    
    while i < n:
        tab.append(i)
        i += 1
    return tab


def arr(n=None):
    if not n:
        return []
    else:
        return [n for n in range(n)]

def arr(n = None):
    res = []
    
    if n == None:
        return res
    else:
        for i in range(n):
            res.append(i)
        return res


    # [ the numbers 0 to N-1 ]


def arr(n = None): 
    array = []
    if n is None:
        return array
    elif n >= 0:
        for i in range(n):
            array.append(i)
        return array

def arr(n=0): 
    solution = []
    x = -1
    if n == 0:
        return []
    else:
        while len(solution) < n:
            x += 1
            solution.append(x)
    return solution


def arr(n=0): 
    solution = []
    x = -1
    if n == 0:
        return []
    else:
        while len(solution) <  n:
            x += 1
            solution.append(x)
    return solution

def arr(n=None): # None for if no arguments passed
    # [ the numbers 0 to N-1 ]
    a = []
    if n is None:
        return a
    else:
        for i in range(n):
            a.append(i)
        return a

import numpy
def arr(n=0):
    return list(range(n))


def arr(n=None): 
    s = []
    if n == None:
        return s
    else:
        for i in range(n):
            s.append(i)
        return s

def arr(n=0):

    array = []
    for i in range(n):
        array.append(i)
        i += 1
    return array

def arr(n=-1):
    if n == -1:
        return []
    else:
        return [num for num in range(n)]

def arr(n=0): 
    # [ the numbers 0 to N-1 ]
    lst = []
    for num in range(0, n) :
        if num not in lst : 
            lst.append(num)
        else :
            return ''
         
    return lst 

def arr(n = 0):
    lis = []
    if not n:
        return lis
    else:
        for i in range (0, n):
            lis.append(i)
        return lis

def arr(n = []):
    if n == []:
        return []
    a = range(0, n)
    return list(a) if n > 0 else []

def arr(n): 
    return(list(range(n)))
def arr(n=0): 
    return(list(range(n)))
    # [ the numbers 0 to N-1 ]


def arr(n = 0): 
    if n is None: 
        return n
    return list(range(n))

def arr(n=0):
    n = list(range(0, n))
    return n# [ the numbers 0 to N-1 ]

def arr(n = -1): 
    if n != -1:
        return [i for i in range(n)]
    else:
        return list()

def arr(*n): 
    return list(range(n[0])) if len(n) > 0 else []

def arr(n=0): 
    test = []
    if (n > 0):
        for i in range(n):
            test.append(i)
    return test  


def arr(n=0): 
    i = 0
    a = [i for i in range(0, n)]
    return a

def arr(*n): 
    # [ the numbers 0 to N-1 ]
        print(*n)
        res = []
        if(n == () or n == 0):
            return []
        else:
            for i in range((*n)):
                res.append(i)
            return res

def arr(n=0): 
    list = []
    for n in range(0,n):
        list.append(n)
    
    return list

def arr(n=0):
    a = [] 
    for i in range(n):
        a.append(i)
    return a

print(arr(4))
print(arr(0))
print(arr())

def arr(n=0): 
    if n == 0:
        lst = []
        return lst
    else:
        return [x for x in range(n)]

def arr(*n):
    for m in n:
        return [i for i in range(0,m)]
    return []

def arr(n=0): 
    list = []
    while n != 0:
        list.append(n-1)
        n -= 1
    list.sort()
    return list


def arr(n=0): 
    
    i = 0;
    ergebnis = [];
    
    if n == ():
        return ergebnis;
    else:
        
        while i < n:
            ergebnis.append(i);
            i = i + 1;
        return ergebnis;

def arr(*args): 
    return [i for i in range(args[0])] if args else []

def arr(n=0): 
            
        return [*list(range(0,n,1))]


def arr(n=0):
    range(n)
    return list(range(n))

def arr(n=0): 
    if n == 0 or n is None: 
        return []
    else:
        return list(range(n))


def arr(n=0): 
    if n == 0:
        return []
    else:
        if n == '' in arr(n):
            return list(print(-1))
        else:
            return list(range(n))


def arr(n=''):
    if n == '':
        return []
    else:
        lista = []
        n = int(n)
        for i in range(n):
            caracter =int(i)
            lista.append(caracter)
        return lista

def arr(n: int = 0) -> list:
    return [*list(range(n))] if n > 0 else []


def arr(n = 0): 
    # [ the numbers 0 to N-1 ]
    array = []
    counter = 0
    while counter < n:
        array.append(counter)
        counter += 1 
    return array


def arr(n = 0):
    if n > 0:
        x = []
        for i in range(n):
            x.append(i)
        return x
    else:
        return []




def arr(n=None): 
    # [ the numbers 0 to N-1 ]
    lst = []
    if n is None:
        return lst
    else:
        while n > 0:
            lst.append(n-1)
            n -= 1
        return sorted(lst)


def arr(n=0): 
    lst = []
    if n > 0:
        for n in range(n):
            lst.append(n)
        print(lst)
        return lst
    else:
        return lst
        
print(arr())



def arr(n=[]):
    if not n:
        return []
    else:
        return list(range(0,n))

def arr(n=0):
    list = []
    if n == 0:
        return list
    for i in range(0, n):
        list.append(i)
    return list

def arr(n = None):
    l_1 = []
    if n is not None:
        for i in range(0,n):
            l_1.append(i)
    else:
        l_1 = []
    return l_1


def arr(*args): 
    return [number for number in range(0,*args)]

def arr(n=None):
    if n is not None:
        return list(range(n))
    else:
        return []

def arr(n=0):
    if n==0:
        return []
    else:
        return [i for i in range(n)]

def arr(n=0): 
    arr =[]
    if n == 0:
        return arr
    for i in range(n):
        arr.append(i)
    return arr

def arr(n = 0): 
    # [ the numbers 0 to N-1 ]
    array =  []
    x = 0
    while x < n:
        array.append(x)
        x+= 1
    return array

def arr(n=0): 
    # [ the numbers 0 to N-1 ]
    num_list = []
    
    if n < 1:
        return num_list    
    else:
        for i in range(n):
            if i < n:
                num_list.append(i)       
        return num_list

def arr(n=None): 
    if n:
        return [i for i in range(n)]
    else:
        return []

arr = lambda n = 0: [x for x in range(0, n)]

def arr(n = 0): 
    List = []
    for x in range(n):
        List.append(x)
    return List

def arr(n=[]):
    if n==[]:
        answer=[]
    else:
        answer=[n for n in range(n)]
    return answer

def arr(*n): 
    try:
        return [i for i in range(n[0]) if n !=0]
    except IndexError: 
        return []

def arr(n=None): 
    # [ the numbers 0 to N-1 ]
    array = []
    if(n is not None and n>=0):
        for i in range(n):
            array.append(i)
    return array

def arr(n = 0): 
    if n == 0:
        return []
    return list(range(0,n))

def arr(n = 0):
    content = []
    if(n > 0):
        for i in range(n):
            content.append(i)
    return content

def arr(n = 0):
    xyu = []
    while n > 0:
        n -= 1
        xyu.append (n)
        xyu.sort ()
    return xyu

def arr(n=0):
    print(type(n))
    array = []
    for x in range(n):
        array.append(x)
        print (type(array[x]))
    return array

def arr(n = 0): 
    lst = []
    if n == 0:
        return []
    else:
        for i in range(n):
            lst.append(i)
        return lst

def arr(n = 0): 
    # [ the numbers 0 to N-1 ]
    i = 0;
    a = []
    if n == 0:
        return []
    while(i < n):
        a.append(i)
        i+=1
    return a

def arr(n = 0):
    a = []
    i = 0
    while i < n:
        a.append(i)
        i = i + 1
    return a

def arr(n=None):
    l = []
    if (n==None or n==0): return l
    for i in range(n):
        l.append(i)
    return l

def arr(n=0):
    # [ the numbers 0 to N-1 ]
    tomb = []
    for i in range(n):
        tomb.append(i)
    return tomb


def arr(n=0):
    if not arr:
        return []
    new_list = []
    for element in range(n):
        new_list.append(element)
    return new_list

def arr(n=0): 
    c=[]
    for i in range(n):
        c.append(i)
    return c



def arr(n=None): 
    if n is None:
        return []
    else:
        return list(range(n))

def arr(*args): 
    array = []
    if args:
        for i in range(args[0]):
            array.append(i)
        
    return array

def arr(n=0): 
    # [ the numbers 0 to N-1 ]
    if(n):
        return list(range(0,n))
    else:
        return []