Write a function in Python to print the Fibonacci sequence up to the nth term.
n = 10
def fibonacci(n): 
    a = 0
    b = 1
    if n < 0: 
        print("Incorrect input") 
    elif n == 0: 
        return a 
    elif n == 1: 
        return b 
    else: 
        for i in range(2,n): 
            c = a + b 
            a = b 
            b = c 
        return b 
    
print("Fibonacci sequence:")
for i in range(n):
    print(fibonacci(i))