num = int(input("Enter a number: ")) n1=0 n2=1 print("Fabonacci series ",n1,n2,end=" ") for i in range(2,num): n3=n1+n2 n1=n2 n2=n3 print(n3,end=" ")
Enter a number: 10 Fabonacci series 0 1 1 2 3 5 8 13 21 34