Python Coverting scrambled alphabet
<p>I am trying to figure out a homework problem. I have all the code written except one part. I need to take an input of a scrambled alphabet and covert it to the A-Z alphabet. I think I need to change these to integers. Any idea how to take a scrambled input and changed it to integers?</p>

<p>Any help is appreciated. Thanks</p>

<p><strong>UPDATE:</strong> Here is the code I've written so far (I can't use the built in functions posted, must be things we've learned already) I need to prompt the user for input so if it asked and I put <code>VNKW KW BO 1WV WJHFJV BJWWXEJ!</code> it needs to scramble to <code>THIS IS MY 1ST SECRET MESSAGE</code>:</p>

<pre><code>import random

def main():
    encrypt = [" "] * 26   #all letters available

    for numbah in range(26):
        letter = chr(numbah+65)
        print (letter, end="")
        # find position for number
        notfound = True
        while notfound:
            position = random.randint(0, 25)
            if encrypt[position] == " ":
                notfound = False
        encrypt[position] = letter

    print("\nScrambled: ", end="")
    for numbah in range(26):
        print(encrypt[numbah], end="")
    print("\n\n ")

    msg=input("Please input the scrambled alphabet in order: ")

    print("Now input the scrambled message:  " + msg)
    print("Your unscrambled message reads: ", end="")
    for alpha in msg.upper():
        if alpha &lt; "A" or alpha &gt; "Z":
            print(alpha,end="")
        else:
            print(encrypt[ ord(alpha) - 65 ], end="")

main()
</code></pre>
