Dear Pythonists
 
Here is the code 
 
def fiba(n):
            a = 0
            b = 1
            while  a < n :
                        print(a)
                        c =  a + b
                        a = a +c
                        
     # 0,1,3,7,15,31,63
 
def fibc(n):
            a = 0
            b = 1
            while  a < n :
                        print(a)
                        a, b = b,a + b
                        
#0,1,1,2,3,5,8,13,21,34,55,89
 
def fibb(n): a + b
            a = 0
            b = 1
            while  a < n :
                        print(a)
                        a = b
                        b = a+b
            
#0,1,2,4,8,16,32,64
 
I am trying to understand function fibc code line a,b = b, a + b and would like 
to see it written line by line
without combining multiply assignment. If possible. I sort of follow the right 
to left evaluation of the other code.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to