Is aplhabet variable a string or a list ?
In the Caesar cipher solution aplhabet variable was assigned in the form of a string but when the input string is shifted and stored in the output alphabet is taken as a list (alphabe[alpha_index+3]) so is aplhabet variable a string or a list ?
1 answers ( 0 marked as helpful)
Alphabet is a string -- it was defined with quote marks. Strings can be indexed just like lists, so the fact that you have code like alphabet[alpah_index + 3], doesn't meant that alphabet is a list.