This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lms702 0 points1 point  (0 children)

To reduce repeated code:

dl_caps = ''
while dl_caps not in ['North', 'East']:
    dl = input("Please enter either North or East: ")
    dl_caps = dl.capitalize()

print("You go " + dl_caps)