Last answered:

13 Dec 2021

Posted on:

13 Dec 2021

0

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)
Posted on:

13 Dec 2021

0

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.

Submit an answer