I understand that you are just starting out to learn Python, but your script could be improved a lot.
In any case, I made a quick pass over your script and this is what I came up with.
This is untested, so there might be some bugs left.
You might also want to consider posting your code e.g. on CodeReview.StackExchange.com for some additional feedback.
I understand that you are just starting out to learn Python, but your script could be improved a lot. In any case, I made a quick pass over your script and this is what I came up with. This is untested, so there might be some bugs left. You might also want to consider posting your code e.g. on CodeReview.StackExchange.com for some additional feedback.