Caesar's Cipher function
<p>I'm trying to make a Caesar's cipher using python and this is how far I can get:</p>

<pre><code>alphabet = ['abcdefghijklmnopqrstuvwxyz']

def create(shift):
    dictionary={}
    emptylist=[]
    int(shift)
    for x in alphabet:
        emptylist.append(x)
        code = ""
        for letters in emptylist:
            code = code + chr(ord(letters) + shift)
            dictionary[letters]=code
    return dictionary
</code></pre>

<p>It gets as far as getting me to put in my shift value but then prints:</p>

<pre><code>Traceback (most recent call last):
  File "&lt;pyshell#0&gt;", line 1, in &lt;module&gt;
    create(2)
  File "C:/Users/Pete/Documents/C- Paisley/A-Level/Computing/dictionarytolist.py", line 11, in create
    code = code + chr(ord(letters) + shift)
TypeError: ord() expected a character, but string of length 26 found
</code></pre>

<p>The end product should be that it prints the shifted letters.</p>
