Basic problem - Syntax error

Michael Ellwood michael.ellwood at virgin.net
Sat Feb 3 15:30:28 EST 2001


Im writing a programme to decrypt a casaer cipher. Im using a while loop
with a counter, and when the counter exceeds a certain value , the loop
stops and the alphabet generated is printed eg:

plaintextalphabet="abcdefghijklmnopqrstuvwxyz"
ciphertext="mhily lza zbhl xbpzxbl mvyabuhl hwwpbz jshbkpbz jhljbz kpjabt
hyjhubt lza ulbayvu"

counter=0
alphabetpos=0

while counter < 26:
    cipheralphabet.append(plaintextalphabet[counter:]
**    counter = counter + 1

print cipheralphabet



Python tells me there is a syntax error on the starred line - can some one
please explain why!! Im so annoyed - this is such a basic problem!!

-=+Stephen+=-







More information about the Python-list mailing list