hi
I want to write this code in do while or if else, or any other way except for loop. here is the code

for i in range(65,90):
     for j in range(65,90):
         for k in range(65,90):             
             token=chr(i)+chr(j)+chr(k)	 	    
             block = ((i<<16)+(j<<8)+(k))             
             cblock = pow(block,e,n)
             table[token]=cblock

can anyone please help me to write this in anyother format?
thanks

hi
I want to write this code in do while or if else, or any other way except for loop. here is the code

for i in range(65,90):
     for j in range(65,90):
         for k in range(65,90):             
             token=chr(i)+chr(j)+chr(k)	 	    
             block = ((i<<16)+(j<<8)+(k))             
             cblock = pow(block,e,n)
             table[token]=cblock

can anyone please help me to write this in anyother format?
thanks

Why are you looking to get away from the for loop? I believe that is the easiest and most straight forward way to do this....

Note: range(65,90) will only give you letters A through Y. You're missing out on the 'Z'; although perhaps that's what you had intended...

Member Avatar for leegeorg07

i think they just want to see if there is any other way to do it, i like to do this every so often to try different things.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.