The code it's self seems to work alright. But you should really be commenting your code. By commenting i mean using # to prefix a line or near the end of a line so that you can input text and for the interpreter to ignore it. This let's you explain what each part of your code is doing at vastly improves your readability. Other than that i'd say your fine but you should really be commenting your code.
Edit: As pointed out by Chris H, you shouldn't comment every part of the code, and only parts that require explanation. For instance if you had a lengthy piece of code that can be hard to interpret without comments. And yes you may not need to comment this particular piece of code but commenting on the less obvious parts are still good practice.