On Tue, Oct 8, 2013, at 11:44, [email protected] wrote: > def add(c1, c2): > ans = ''
This only makes sense if your answer is going to be multiple characters.
> for i in c1 + c2:
This line concatenates the strings together.
> ans += chr((((ord(i)-65))%26) + 65)
The way you are doing the modulus, this results in - well, let me
illustrate:
>>> add('','WXYZ[\]^_`abcde')
'WXYZABCDEFGHIJK'
--
https://mail.python.org/mailman/listinfo/python-list
