0

I am writing a code for shift cipher but I am not getting the answer... Please say me where am I wrong

a=['a'.......'z'] b=['p','l'] i=j=0 while j <2 if a [i]=b [j] k=0 while k <26 b [j]=a [i+k ] print (b[j]) k=k+1 i=i+1 j=j+1

31st Jan 2017, 2:30 AM
Akshay
Akshay - avatar
1 ответ
+ 4
After the 1st while loop: while j < 2: if a[i] = b[j]: That's not comparing values, use == instead.
1st Feb 2017, 7:45 PM
Mark Foxx
Mark Foxx - avatar