def fib2(n):   
    """
    returns list of Fibonacci series up to nth term
    """
    result = [0, 1]
    i = 2
    while i < n:
        result.append(result[i-1] + result[i-2])
        i += 1
    return result