lis=[x*x for x in range(10)]
print(lis)

print("Generator: ")
gene_ex=(x*x for x in range(10))
print(gene_ex)
for i in range(10):
    print(next(gene_ex))
    
def fib(max):
    n,a,b=0,0,1
    while n<max:
        a,b=b,a+b
        n=n+1
        print(a)
    return 'done'
print(fib(10))

def fib1(max):
    n,a,b=0,0,1
    while n<max:
        yield b
        a,b=b,a+b
        n=n+1
        print(a)
    return 'done'
print("yeild\n")
print(fib1(10))

def fib2(n):
    if n<=1:
        return n
    else:
        print("times")
        return(fib(n-1)+fib(n-2))
print("resursion")
print(fib2(10))
